/*********************************************************
 * Global
 *********************************************************/

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: visible;
}
body {
	color: white;
	font-size: 11pt;
	font-family: Verdana, Helvetica, Arial, sans-serif;

	/* see https://pokemonshowdown.com/credits */
	background: #344b6c url(../fx/client-bg-wildcard.jpg?v=5) no-repeat center center fixed;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
}
body::before {
	content: '';
	position: fixed;
	inset: 0;
	background: var(--bg-brightness-overlay, transparent);
	pointer-events: none;
	z-index: 0;
}
@media (max-aspect-ratio: 1/1) and (min-aspect-ratio: 2/3) {
	body {
		background-image: url(../fx/client-bg-wildcard-tablet.jpg?v=5);
	}
}
@media (max-aspect-ratio: 2/3) {
	body {
		background-image: url(../fx/client-bg-wildcard-phone.jpg?v=5);
	}
}

.pad {
	margin: 0;
	padding: 5px 15px;
}
.pad p {
	margin: 9px 0;
}
.label strong {
	font-size: 11pt;
	display: block;
}
.buttonbar {
	margin-top: 1em;
	text-align: center;
}

select {
	font-size: 9pt;
	font-family: Verdana, Helvetica, Arial, sans-serif;
}

.dark .tabbar a.button,
.dark .tabbar a.button:hover {
	box-shadow: inset 0.5px 1px 1px rgba(255, 255, 255, 0.5);
}
.dark .tabbar a.button:active,
.dark .tabbar a.button.cur,
.dark .tabbar a.button.cur:hover,
.dark .tabbar a.button.cur:active {
	box-shadow: none;
}
.dark .maintabbarbottom {
	background: #555555;
	border-color: #5A5A5A;
	border-top-color: #34373b;
}

/*********************************************************
 * Header
 *********************************************************/

.header {
	position: relative;
	z-index: 2;
	height: 50px;
	background: url(../fx/client-topbar-bg.png) repeat-x left top scroll;
}
.header h1 {
	margin: 0;
	padding: 0;
}
.header .logo {
	float: left;
	margin: 2px 0 0 2px;
}

.userbar {
	position: absolute;
	top: 12px;
	right: 12px;
	font-weight: bold;
}
.userbar .username {
	color: black;
	text-shadow: 1px 1px 0 #f8f8f8, 1px -1px 0 #f8f8f8, -1px 1px 0 #f8f8f8, -1px -1px 0 #f8f8f8;
}
.username {
	cursor: pointer;
}
@media (max-width: 500px) {
	.usernametext {
		display: none
	}
}
.userbar button.icon {
	height: 25px;
	width: 27px;
	font-size: 16px;
	text-align: center;
	padding: 0;
}
.userbar button.icon i {
	margin: 0 -5px;
}
.userbar button[name=login] .login-mobile-icon {
	display: none;
}

.tabbar {
	position: absolute;
	bottom: 1px;
	left: 0;
	right: 0;

	display: block;
	list-style: none;
	margin: 0;
	padding: 2px 0 0 0;
	height: 37px;
	text-align: left;

	color: white;
	text-shadow: 0 1px 0 black;
	font-size: 10pt;

	line-height: 100%;
}
.maintabbarbottom {
	content: "";
	display: block;
	position: absolute;
	left: 0;
	right: 0;
	bottom: -6px;
	height: 6px;
	background: #f8f8f8;
	border: solid 1px #AAAAAA;
	border-left: 0;
	border-right: 0;
	margin: -1px 0 0 0;
	-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
	-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
	box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.tabbar.maintabbar {
	margin-left: 144px;
	margin-right: 165px;
	overflow: hidden;
}
.tabbar.maintabbar.minitabbar {
	margin-left: 0;
}
.maintabbar .inner {
	width: 400%; /* make sure overflows go right and not down */
}
.maintabbar .overflow {
	position: absolute;
	bottom: 0;
	right: 0;
	z-index: 12;
}
.maintabbar .overflow .button {
	height: 37px;
	width: 32px;
	font-size: 12pt;
	margin: 0;
	border-radius: 0;
}

.button.subtle-notifying .fa-comment-o:before,
.button.notifying .fa-comment-o:before {
	content: "\f0e6";
}

.tabbar li,
.tabbar ul {
	display: block;
	float: left;

	list-style: none;
	margin: 0;
	padding: 0;
}
.tabbar a.button {
	display: inline-block;
	height: 28px;
	min-width: 52px;
	white-space: nowrap;

	position: relative;
	padding: 3px 2px 3px 2px;
	margin: 0 -1px 0 0;
	top: 1px;
	border-radius: 0;
	box-shadow: inset 0 -1px 2px rgba(255,255,255,1);
	font-size: 11px;
}
.tabbar a.button.cur {
	box-shadow: none;
}
.tabbar a.button i {
	display: block;
	text-align: center;
	margin: 1px auto 0 auto;
	font-style: normal;
	font-size: 14px;
	height: 14px;
}
.tabbar a.button span {
	display: block;
	overflow: hidden;
}
.tabbar a.button i.text {
	font-size: 11px;
	margin-right: 8px;
	padding-left: 0;
	overflow: hidden;
	font-weight: bold;
}
.tabbar a.button i.text + span {
	margin-right: -6px;
}
.tabbar a.button:hover,
.tablist a.button:hover,
.tabbar a.button:focus,
.tablist a.button:focus {
	z-index: 10;
}
.tabbar a.button.cur,
.tabbar a.button.cur:hover {
	border-bottom: 0;
	padding-top: 3px;
	padding-bottom: 5px;
	top: 0px;
}
.tabbar li:first-child a.button {
	border-top-left-radius: 5px;
	margin-left: 6px;
}
.tabbar li:last-child a.button {
	border-top-right-radius: 5px;
}
.tabbar a.closable {
	padding-right: 8px;
}
.tabbar .closebutton {
	display: inline-block;
	margin: 0 0 0 -17px;
	width: 17px;
	text-align: left;
	top: 3px;
	vertical-align: top;
	position: relative;
	z-index: 11;
}
.tabbar a.cur + .closebutton {
	top: 2px;
}
.header-username,
.closebutton,
.minimizebutton {
	text-decoration: none;
	font-size: 14px;
	color: #999999;
	text-shadow: none;
	border: 0;
	padding: 0;
	margin: 0;
	background: transparent;
	cursor: pointer;
}
.closebutton:hover {
	color: #BB2222;
}
.dark .closebutton:hover {
	color: #EE7777;
}
span.header-username:hover {
	color: #333333;
}
.minimizebutton:hover,
summary:hover .expandbutton,
.pm-window h3:hover .minimizebutton {
	color: #333333;
}
.dark .minimizebutton:hover,
.dark summary:hover .expandbutton,
.dark .pm-window h3:hover .minimizebutton {
	color: #CCCCCC;
}
.pm-window h3 .closebutton:hover + .minimizebutton {
	color: #999999 !important;
}
.pm-window h3 span.header-username:hover + .minimizebutton {
	color: #999999 !important;
}
.closebutton:active,
.minimizebutton:active {
	color: #661111;
}
.pm-minimized .minimizebutton .fa-minus-circle:before {
	/** replace the minus with a plus when PM is minimized */
	content: "\f055";
}

.tablist li, .tablist ul {
	/** tablist is the menu that's displayed when the window is too wide for all the tabs */
	list-style: none;
	margin: 0;
	padding: 0;
}
.tablist ul {
	padding: 3px 0 4px 0;
}
.tablist li {
	margin: 0 -5px -1px -5px;
	padding: 0;
}
.tablist .button {
	position: relative;
	box-shadow: inset 0 0px 2px rgba(255,255,255,1);
	font-size: 11pt;
	padding: 4px 28px 4px 6px;
	width: 120px;
	height: 18px;
	text-align: left;
	border-radius: 0;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.tablist li:first-child .button {
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
}
.tablist li:last-child .button {
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
}
.tablist .closebutton {
	display: block;
	float: right;
	margin-top: -28px;
	padding: 5px 0 0 0;
	height: 23px;
	font-size: 14px;
	width: 28px;
	text-align: center;

	position: relative;
	z-index: 11;
}
.tablist i.text {
	font-size: 9pt;
	font-weight: normal;
	font-style: normal;
	margin-right: 3px;
}
.tablist i.text::before {
	content: '[';
}
.tablist i.text::after {
	content: ']';
}

/*********************************************************
 * Rooms
 *********************************************************/

.ps-room {
	position: absolute;
	z-index: 1;
	display: block;
	top: 56px;
	left: 0;
	right: 0;
	bottom: 0;

	border-left: 1px solid #AAAAAA;
	margin-left: -1px;
}
.scrollable {
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}
.ps-room.ps-room-light {
	background: rgba(242,247,250,.85);
	color: black;
}
.ps-room.ps-room-opaque {
	background: #EEF2F5;
	color: black;
}

.ps-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #CCCCCC;
	background: rgba(212, 212, 212, .5);

	overflow: auto;
	-webkit-overflow-scrolling: touch;
	z-index: 20;
}
.ps-popup {
	position: absolute;
	top: auto; right: auto; left: auto; bottom: auto;
	text-align: left;
	background: #E1E8E8;
	color: black;
	border: 1px solid #999999;
	padding: 2px 10px;

	border-radius: 6px;
	box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #DDDDDD, 2px 2px 3px rgba(0,0,0,.2);
	z-index: 20;
}
.ps-overlay .ps-popup {
	position: static;
	margin: 80px auto 20px auto;
	max-width: 320px;
}
.ps-popup p {
	margin: 4px 0;
}
.ps-popup h3 {
	margin: 7px 0;
}
.ps-popup h3 {
	font-size: 12pt;
}
p.or {
	font-size: 12pt;
	font-style: italic;
	font-weight: bold;
	color: #444444;
	margin: 20px 0;
	text-align: center;
}
p.or:before,
p.or:after {
	content: "";
	font-size: 10px;
	padding: 0 0 0 85px;
	margin: 0 9px 0 0;
	border-bottom: 1px solid #777777;
	position: relative;
	top: -7px;
}
p.or:after {
	margin: 0 0 0 9px;
}
.ps-popup p.error {
	font-weight: bold;
	color: #EE4422;
}

.popupmenu {
	margin: -2px 0 -1px 0;
	padding: 0;
	list-style: none;
	font-size: 8pt;
}
.popupmenu h3 {
	margin: 5px 0 0 -2px;
	padding: 1px 0;
	font-size: 8pt;
	color: #579;
}
.popupmenu li:first-child h3 {
	margin-top: 0;
}
@media (max-height:590px) {
	.popupmenu h3 {
		margin-top: 2px;
	}
	.popupmenu, popupmenu li {
		margin: -3px 0 -2px 0;
	}
}
@media (max-height:518px) {
	.popupmenu h3 {
		margin-top: 1px;
	}
}

.popupmenu .option {
	width: 204px;
}
.popupmenu i {
	display: inline-block;
	width: 16px;
	color: #777777;
}
.popupmenu i.subtle {
	opacity: 0.25;
	filter: alpha(opacity=25);
}
.popupmenu i.subtle:hover {
	opacity: 1.0;
	filter: alpha(opacity=100);
}

.popupmenu .button {
	margin: 2px auto 5px;
	width: 184px;
}
.select, .team {
	width: 230px;
	min-height: 32px;
	height: auto;
	padding: 0 5px;
	font-size: 9pt;
	text-align: left;
	font-family: Verdana, Helvetica, Arial, sans-serif;
	cursor: pointer;

	border-radius: 4px;
	color: black;
	box-sizing: border-box;
}
.team:focus {
	outline: 0 none;
	border: 1px solid #004488;
	box-shadow: inset 0px 1px 2px #D2D2D2, 0px 0px 5px #2266AA;
}
.team.teamselect {
	padding-right: 15px;
	padding-left: 0;
}
.team.teamselect small .picon {
	margin-right: -6px;
}
.teamselect:disabled strong {
	color: #444444;
}
.dark .teamselect:disabled strong {
	color: #c7c7c7;
}
.team.team-hover {
	border-color: #555555;
	background: #FFFFFF;
	background: linear-gradient(to bottom,  #dce4ec,  #c6d3e0);
}
.team:active {
	border-color: #777777;
	background: #DDDDDD;
	box-shadow: none;
	background: linear-gradient(to bottom,  #bbc4cd,  #e7edf2);
}
.dark .team.team-hover {
	border-color: #34373b;
	background: #FFFFFF;
	color: white;
	background: linear-gradient(to bottom, #8f98a1, #4a5057);
}
.dark .team:active {
	border-color: #34373b;
	box-shadow: none;
	background: linear-gradient(to bottom, #4a5057, #8f98a1);
}

/*********************************************************
 * Main menu
 *********************************************************/

.leftmenu {
	padding: 40px 0 0 0;
	width: 324px;
}
.rightmenu {
	position: absolute;
	top: 40px;
	right: 25px;
}
.activitymenu {
	position: absolute;
	left: 325px;
	top: 40px;
}
.mainmenu {
	padding: 0 0 51px 0;
}

.battleform {
	width: 230px;
	text-align: left;
	margin: 0 auto;
}
.battleform .buttonbar {
	text-align: center;
}
.battleform .battlebot-btn,
.battleform .button.abilitylist-menu-btn,
.battleform .button[name="battleBot"] {
	width: 230px;
	height: auto;
	min-height: 50px;
	padding: 6px 8px;
	font-size: 12pt;
	box-sizing: border-box;
}

.mainmenuwrapper {
	position: relative;
	min-height: 100%;
}
.mainmenufooter {
	position: absolute;
	bottom: 15px;
	left: 20px;
	color: #BBBBBB;
	text-shadow: 0 0 3px black, 0 0 3px black, 0 0 3px black;
}
.mainmenufooter blockquote {
	margin: 0 0 1em 0;
	padding: 0;
}
.mainmenufooter small {
	font-size: 9pt;
}
.mainmenufooter small small {
	font-size: 8pt;
}
.mainmenufooter a, .mainmenufooter button {
	background: transparent;
	border: 0;
	padding: 0;
	text-shadow: 0 0 3px black, 0 0 3px black, 0 0 3px black;

	text-decoration: underline;
	color: #99BBEE;
}
.mainmenufooter a:hover, .mainmenufooter button:hover {
	text-decoration: underline;
	color: #CCDDFF;
}

.pmbox {
	width: 270px;
	margin: 0 auto;
	min-height: 2px;
}
.pm-window {
	margin: 0 -12px 12px -10px;
}
.tiny-layout .pm-window {
	margin: 0 0 12px 0;
}
.pm-window h3 {
	background: rgba(248,248,248,.8);
	color: #777777;
	margin: 0;
	padding: 2px 4px 2px 5px;
	font-size: 11pt;
	border: 1px solid #AAAAAA;
	border-top-left-radius: 5px;
	border-top-right-radius: 5px;
	cursor: pointer;
}
.pm-window h3:hover {
	color: #333333;
}
.pm-window h3.pm-minimized {
	border-radius: 5px;
}
.pm-window h3.pm-notifying {
	border-color: #AA8866;
	background: #E3C3A3;
}
.dark .pm-window h3.pm-notifying {
	background: #417589;
	color: #BBBBBB;
}
.pm-window h3.pm-notifying:hover {
	border-color: #604020;
	background: #CFAF8F;
}
.dark .pm-window h3.pm-notifying:hover {
	background: #417589;
}
.pm-window h3 .closebutton,
.pm-window h3 .minimizebutton {
	float: right;
	margin: -2px -5px 0 0;
	width: 22px;
	height: 21px;
}
.pm-window h3 small {
	color: #888888;
	font-weight: normal;
	vertical-align: 1px;
}
.pm-log {
	min-height: 100px;
	max-height: 300px;
	background: rgba(242,247,250,.925);
	color: black;
	border: 1px solid #AAAAAA;
	border-top: 0;
	border-bottom: 0;

	overflow: auto;
	-webkit-overflow-scrolling: touch;
	word-wrap: break-word;
}
.pm-buttonbar {
	padding-bottom: 3px;
}
.pm-log-add {
	color: black;
	border: 1px solid #AAAAAA;
	border-bottom-left-radius: 5px;
	border-bottom-right-radius: 5px;
	background: rgba(242,247,250,.85);
}
.pm-window.collapsed .pm-log,
.pm-window.collapsed .pm-log-add {
	display: none;
}
.pm-window.focused h3,
.pm-window.focused .pm-log,
.pm-window.focused .pm-log-add {
	border-color: #555555;
}
.pm-window.focused h3,
.pm-window.focused h3:hover {
	background: #f8f8f8;
	color: #222222;
}
.dark .pm-window h3 {
	background: rgba(50,50,50,.8);
	color: #AAA;
}
.dark .pm-window h3:hover {
	color: #CCC;
}
.dark .pm-window.focused h3,
.dark .pm-window.focused h3:hover {
	background: #222;
	color: #EEE;
}
.challenge {
	margin-top: -1px;
	background: #fcd2b3;
	border: 1px solid #f57b21;
	color: #682f05;
	padding: 1px 5px;
}
.challenge p {
	margin: 4px 0;
}
.newsentry {
	font-size: 9pt;
	padding: 1px 10px;
	border-bottom: 1px solid #AAAAAA;
}
.unread {
	background: rgba(255,240,130,0.33);
}

.tiny-layout .leftmenu,
.tiny-layout .rightmenu,
.tiny-layout .activitymenu {
	position: static;
	top: 0;
	right: 0;
	left: 0;
	width: auto;
	margin: 0;
	padding: 0;
}
.tiny-layout .leftmenu {
	padding-top: 30px;
}
.tiny-layout .activitymenu {
	padding-bottom: 8px;
}

.mainmessage {
	display: block;
	padding: 10px 15px;
	margin: 30px 40px;
	max-width: 400px;
	border-radius: 20px;

	background: rgba(201, 207, 219, .8);
	color: black;
}
.menugroup {
	display: block;
	padding: 10px 0;
	margin: 0 auto 30px auto;
	max-width: 270px;
	border-radius: 20px;

	background: rgba(0,0,0,.2);
	color: white;
	text-shadow: 0 1px 0 black;
	text-align: center;
}

.mainmessage p,
.menugroup p {
	margin: 10px 0;
}
.menugroup .button {
	box-sizing: border-box;
	font-size: 12pt;

	display: inline-block;
	padding: 5px 7px 3px 7px;

	width: 200px;

	text-shadow: 0 -1px 0 hsl(210,40%,10%);
	box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 1px 1px rgba(255,255,255,.8);

	/* default colors */
	color: #FFFFFF;
	border: solid 1px #AAAAAA;
	background: #779EC5;
	background: hsl(210,40%,62%);
	background: linear-gradient(to bottom,  hsl(210,40%,72%),  hsl(210,40%,52%));
	border-color: hsl(210,40%,40%);
}
.menugroup .button.big {
	width: 230px;
	height: 50px;
	padding: 0;
	font-size: 14pt;
}
.menugroup .button.big small {
	display: block;
	font-size: 9pt;
}
.menugroup .button:hover {
	background: #5485B6;
	background: hsl(210,40%,52%);
	background: linear-gradient(to bottom,  hsl(210,40%,62%),  hsl(210,40%,42%));
	border-color: hsl(210,40%,21%);
}
.menugroup .button:active {
	box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 -1px 1px rgba(255,255,255,.3), inset 0 1px 1px rgba(0,0,0,.4);
	background: #406B96;
	background: hsl(210,40%,42%);
	background: linear-gradient(to bottom,  hsl(210,40%,42%),  hsl(210,40%,58%));
	border-color: hsl(210,40%,21%);
}
.menugroup .button.disabled,
.menugroup .button.disabled:hover,
.menugroup .button.disabled:active {
	cursor: default;
	background: #EEEEEE;
	border-color: #CCCCCC;
	border-style: solid;
	border-width: 1px;
	color: #999999;
	text-shadow: none;
	box-shadow: 0 1px 2px rgba(0,0,0,.1);
}

.button.mainmenu1 { background: linear-gradient(to bottom,  hsl(5,40%,72%),  hsl(5,40%,52%)); border-color: hsl(5,40%,40%); }
.button.mainmenu1:hover { background: linear-gradient(to bottom,  hsl(5,40%,62%),  hsl(5,40%,42%)); }
.button.mainmenu1:active { background: linear-gradient(to bottom,  hsl(5,40%,42%),  hsl(5,40%,58%)); }

.button.mainmenu2 { background: linear-gradient(to bottom,  hsl(30,40%,72%),  hsl(30,40%,52%)); border-color: hsl(30,40%,40%); }
.button.mainmenu2:hover { background: linear-gradient(to bottom,  hsl(30,40%,62%),  hsl(30,40%,42%)); }
.button.mainmenu2:active { background: linear-gradient(to bottom,  hsl(30,40%,42%),  hsl(30,40%,58%)); }

.button.mainmenu3 { background: linear-gradient(to bottom,  hsl(60,40%,72%),  hsl(60,40%,52%)); border-color: hsl(60,40%,40%); }
.button.mainmenu3:hover { background: linear-gradient(to bottom,  hsl(60,40%,62%),  hsl(60,40%,42%)); }
.button.mainmenu3:active { background: linear-gradient(to bottom,  hsl(60,40%,42%),  hsl(60,40%,58%)); }

.button.mainmenu4 { background: linear-gradient(to bottom,  hsl(130,40%,72%),  hsl(130,40%,52%)); border-color: hsl(130,40%,40%); }
.button.mainmenu4:hover { background: linear-gradient(to bottom,  hsl(130,40%,62%),  hsl(130,40%,42%)); }
.button.mainmenu4:active { background: linear-gradient(to bottom,  hsl(130,40%,42%),  hsl(130,40%,58%)); }

.button.mainmenu5 { background: linear-gradient(to bottom,  hsl(210,40%,72%),  hsl(210,40%,52%)); border-color: hsl(210,40%,40%); }
.button.mainmenu5:hover { background: linear-gradient(to bottom,  hsl(210,40%,62%),  hsl(210,40%,42%)); }
.button.mainmenu5:active { background: linear-gradient(to bottom,  hsl(210,40%,42%),  hsl(210,40%,58%)); }

.button.mainmenu6 { background: linear-gradient(to bottom,  hsl(270,40%,72%),  hsl(270,40%,52%)); border-color: hsl(270,40%,40%); }
.button.mainmenu6:hover { background: linear-gradient(to bottom,  hsl(270,40%,62%),  hsl(270,40%,42%)); }
.button.mainmenu6:active { background: linear-gradient(to bottom,  hsl(270,40%,42%),  hsl(300,40%,58%)); }

.rightmenu {
	width: 294px;
}
.rightmenu .menugroup .button {
	width: 180px;
}
@media (max-width:895px) {
	.mainmenu {
		padding-bottom: 1px;
	}
	.rightmenu, .tiny-layout .rightmenu {
		position: static;
		top: 0;
		right: 0;
		padding-bottom: 51px;
	}
	.rightmenu {
		width: 324px;
	}
	.rightmenu .menugroup .button {
		width: 200px;
	}
}

/*********************************************************
 * Ladder
 *********************************************************/

.ladder table, .ladder td, .ladder th {
	border-collapse: collapse;
	border: 1px solid #BBBBBB;
}
.ladder td, .ladder th {
	padding: 3px 5px;
}
.ladder th {
	text-align: left;
	font-size: 9pt;
	background: #EEEEEE;
	color: #111111;
}
.ladder span {
	color: gray;
}

.hidden {
	display: none;
}

/*********************************************************
 * Room list
 *********************************************************/

.roomlisttop {
	max-width: 480px;
	margin-bottom: 10px;
}
.roomcounters {
	max-width: 480px;
	margin: 8px 0 15px 0;
	text-align: center;
}
@media (max-width: 382px) {
	.roomcounters {
		margin: 38px 0 15px 0;
	}
}
.roomcounters button {
	margin: 0 auto;
	width: 120px;
	height: 60px;
	padding: 3px 8px;
	text-align: center;
	vertical-align: middle;
	font-size: 10pt;
	position: relative;
}
.roomcounters button strong {
	display: block;
	font-size: 18pt;
	font-weight: normal;
}
.roomcounters .usercount {
	display: block;
	width: 49px;
	height: 63px;
	position: absolute;
	left: -30px;
	bottom: -5px;
	background: url(https://play.pokemonshowdown.com/sprites/gen5/meloetta.png) center no-repeat;
}
.roomcounters button:hover .usercount {
	background: url(https://play.pokemonshowdown.com/sprites/gen5ani/meloetta.gif) center no-repeat;
}
.roomcounters .usercount.afd,
.roomcounters button:hover .usercount.afd {
	background: url(https://play.pokemonshowdown.com/sprites/afd/meloetta.png) center no-repeat;
}
.roomcounters .battlecount {
	display: block;
	width: 46px;
	height: 76px;
	position: absolute;
	right: -30px;
	bottom: -10px;
	background: url(https://play.pokemonshowdown.com/sprites/gen5/meloetta-pirouette.png) center no-repeat;
}
.roomcounters button:hover .battlecount {
	background: url(https://play.pokemonshowdown.com/sprites/gen5ani/meloetta-pirouette.gif) center no-repeat;
} 
.roomcounters .battlecount.afd,
.roomcounters button:hover .battlecount.afd {
	background: url(https://play.pokemonshowdown.com/sprites/afd/meloetta-pirouette.png) center no-repeat;
}

.roomlist {
	max-width: 480px;
	text-align: left;
	list-style: none;
	margin: 0;
	padding: 0;
}
.roomlist .subrooms {
	font-size: 8pt;
	padding-left: 20px;
	margin: -5px 0 4px;
}
.roomlist .subrooms i.fa-level-up {
	margin-right: 5px;
}
.roomlist .subrooms a.blocklink {
	display: inline-block;
	margin: 0;
	vertical-align: middle;
	font-size: 8pt;
}

/*********************************************************
 * Chat
 *********************************************************/

.chat-log {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 40px;
	font-size: 10pt;
	background: rgba(242,247,250,.5);
	color: black;

	overflow: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	word-wrap: break-word;
}
.chat-log-add {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	min-height: 36px;
	padding: 3px 4px 0 4px;
	border-top: 1px solid #AAAAAA;
}
.chat-log .notice,
.chat-log .chat,
.pm-log .chat {
	padding: 3px 0 3px 0;
	font-size: 9pt;
}
.chat-log .chat.mine,
.pm-log .chat.mine {
	margin-left: -8px;
	margin-right: -8px;
	padding-left: 8px;
	padding-right: 8px;
}
.chat em {
	padding: 0 4px 0 3px;
	font-style: normal;
}
.chat small {
	font-weight: normal;
	font-size: 8pt;
	color: #888888;
}
.chat .message-announce small {
    color: #def;
}
.chat.timer {
	color: #992222;
}
.debug {
	display: none;
}
.highlighted {
	background: rgba(255,200,80,0.33);
}
.chat.highlighted {
	margin-left: -8px;
	margin-right: -8px;
	padding-left: 8px;
	padding-right: 8px;
}
.revealed {
	background-color: #C8FDEA;
}
.message-pm {
	color: #007100;
}
.message-pm .pmnote {
	cursor: pointer;
}
.chat-log .inner,
.pm-log .inner {
	padding: 4px 8px 6px 8px;
}

.chatbox {
	margin: 0 10px 0 80px;
	padding: 5px 0 0 0;
}
.chatbox.nolabel {
	margin: 0 14px 0 6px;
	padding: 5px 0 5px 0;
}
.chatbox label {
	float: left;
	margin-left: -78px;
	padding-top: 2px;
	width: 73px;
	text-align: right;
	overflow: hidden;
	white-space: pre;

	font-weight: bold;
	font-size: 8pt;
}
.chatbox textarea {
	display: block;
	box-sizing: content-box;
	height: 1.1em;
	width: 100%;
	resize: none;
	font-size: 9pt;
	font-family: Verdana, Helvetica, Arial, sans-serif;
	overflow-x: hidden;
	overflow-wrap: break-word;
}

/* Tournaments */

.tournaments-info > ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tournament-wrapper {
	display: none;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2em;
	line-height: 2em;
	text-align: center;
	border-bottom: 1px #aaa solid;
}
.tournament-wrapper.active {
	display: block;
}
.tournament-wrapper.active + .chat-log {
	top: 2.4em;
}

.tournament-title {
	font-weight: bold;
	cursor: pointer;
}
.tournament-title:hover {
	background: rgba(242, 247, 250, 0.85);
}
.dark .tournament-title:hover {
	background: rgba(50, 50, 50, 0.85);
}

.tournament-status, .tournament-toggle {
	position: absolute;
	top: 0;
	padding: 0 0.5em;
	font-weight: normal;
	font-size: 80%;
	background-color: rgba(242, 247, 250, 0.85);
	border-right: 1px #aaa solid;
}
.tournament-status {
	left: 0;
}
.tournament-toggle {
	right: 0;
	border-left: 1px #aaa solid;
}

.tournament-box {
	position: absolute;
	top: 2em;
	left: 0;
	right: 0;
	z-index: 1;
	line-height: 1em;
	border-bottom: 1px #aaa solid;
	border-right: 1px #aaa solid;
	background-color: rgba(242, 247, 250, 0.85);
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.15s;
	-webkit-transition: max-height 0.15s;
	touch-action: none;
}

.tournament-bracket {
	max-height: 200px;
	padding: 10px;
	overflow: hidden;
	font-size: 8pt;
	touch-action: none;
}

.tournament-bracket-overflowing {
	height: 200px;
	padding: 0;
	position: relative;
	left: 0;
	top: 0;
	touch-action: none;
}


.tournament-popout-link {
	position: absolute;
	bottom: 0.5em;
	right: 0.5em;
}
.tournament-popout-bracket {
	/* Actual max-width and -height setting is in client-chat-tournament.js (BracketPopup)
	max-width: 80%;
	max-height: 80%;*/
	max-width: inherit !important;
	position: relative !important;
	left: 0;
	top: 0;
	overflow: hidden;
	padding: 0;
	font-size: 8pt;
	text-align: center;
}
.tournament-popout-bracket > *[class^='tournament-bracket-'] {
	position: absolute;
	right: 0;
	top: 0;
}
.tournament-popout-bracket > .buttonbar {
	position: absolute;
	right: 0.5em;
	bottom: 0;
}

.tournament-bracket-table {
	margin: 0 auto;
	empty-cells: hide;
	border-bottom: 1px #aaa solid;
	border-collapse: collapse;
}
.tournament-bracket-table td, .tournament-bracket-table th {
	border: 1px #aaa solid;
	padding: 5px;
}
.tournament-bracket-table td {
	white-space: nowrap;
}
.tournament-bracket-table .empty,
.tournament-bracket-table .tournament-bracket-table-cell-null {
	border-width: 0;
}
.tournament-bracket-table-cell-result-win {
	background-color: rgba(128, 196, 128, 0.7);
	color: black;
}
.tournament-bracket-table-cell-result-draw {
	background-color: rgba(255, 196, 128, 0.7);
	color: black;
}
.tournament-bracket-table-cell-result-loss {
	background-color: rgba(255, 128, 128, 0.7);
	color: black;
}

.tournament-bracket-tree {
	text-align: center;
}
.tournament-bracket-tree-link {
	fill: none;
	stroke: #aaa;
}
.tournament-bracket-tree-link-active {
	stroke: #aa0;
	stroke-width: 3px;
}
.tournament-bracket-tree-abbreviated {
	fill: #999;
}
.tournament-bracket-tree-node rect {
	/* Note: Due to SVG limitations, dimensions and border radii are in client-chat-tournament.js (nodeSize) */
	fill: rgba(178, 194, 210, 0.7);
	stroke: rgba(74, 77, 80, 0.7);
	color: black;
}
.tournament-bracket-tree-node a rect {
	fill: hsla(219, 93%, 77%, 0.7);
	stroke: hsla(219, 100%, 25%, 0.7);
	color: black;
}
.tournament-bracket-tree-node a:hover rect {
	fill: hsla(218, 38%, 82%, 0.7);
	stroke: hsla(219, 68%, 35%, 0.7);
	color: black;
}
.tournament-bracket-tree-node-match-available rect,
.tournament-bracket-tree-node-match-challenging rect {
	fill: hsla(294, 36%, 71%, 0.7);
	stroke: hsla(294, 68%, 35%, 0.7);
	color: black;
}
.tournament-bracket-tree-node rect.tournament-bracket-tree-win {
	fill: rgba(128, 196, 128, 0.7);
	stroke: rgba(0, 128, 0, 0.7);
	color: black;
}
.tournament-bracket-tree-node rect.tournament-bracket-tree-loss,
.tournament-bracket-tree-node rect.tournament-bracket-tree-draw {
	fill: hsla(219, 0%, 71%, 0.7);
	stroke: hsla(219, 0%, 35%, 0.7);
	color: black;
}
.tournament-bracket-tree-node text, .tournament-bracket-tree-node {
	font-size: 8.5pt;
	text-anchor: middle;
	font-weight: bold;
}
.tournament-bracket-tree-node a {
	color: #248;
}
.tournament-bracket-tree-node a text, .tournament-bracket-tree-node a:hover text {
	fill: #248;
}
.tournament-bracket-tree-team-win {
	font-weight: bold;
}
.tournament-bracket-tree-team-loss, .tournament-bracket-tree-team-draw, .tournament-bracket-tree-score {
	font-weight: normal;
}

.tournament-tools {
	padding: 10px;
	display: none;
	border-top: 1px #aaa solid;
}
.tournament-tools.active {
	display: block;
}
.tournament-team {
	padding-bottom: 5px;
}
.tournament-challenge-user,
.tournament-challenged-message,
.tournament-challenging-message,
.tournament-challengeby {
	font-size: 9pt;
	padding-bottom: 5px;
}
.tournament-tools .button {
	font-size: 9pt;
}

.tournament-join,
.tournament-leave,
.tournament-validate {
	display: none;
}
.tournament-join.active,
.tournament-leave.active,
.tournament-validate.active {
	display: inline;
}

.tournament-nomatches,
.tournament-challenge,
.tournament-challengeby,
.tournament-challenging,
.tournament-challenged {
	display: none;
}
.tournament-nomatches.active,
.tournament-challenge.active,
.tournament-challengeby.active,
.tournament-challenging.active,
.tournament-challenged.active {
	display: block;
}

.tournament-message-create,
.tournament-message-start,
.tournament-message-forceend,
.tournament-message-end-winner {
	font-weight: bold;
}
.tournament-message-end-bracket {
	font-weight: normal !important;
	max-height: 400px;
	overflow: hidden;
	text-align: center;
}
.tournament-message-end-bracket-overflowing {
	height: 400px;
	position: relative;
	left: 0;
	top: 0;
}

/* Userlist */

.userlist {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	width: 145px;
	height: auto;
	border-right: 1px solid #AAAAAA;

	overflow: auto;
	-webkit-overflow-scrolling: touch;
}
.pm-buttonbar {
	height: 21px;
}
.pm-buttonbar button {
	float: left;
	font: 8pt Verdana, sans-serif;
	height: 21px;
	background: #EEF2F5;
	color: black;
	border: 0;
	border-right: 1px solid #AAAAAA;
	border-bottom: 1px solid #AAAAAA;
}
.dark .userlist, .dark .pm-buttonbar button, .dark .chat-log-add, .dark .pm-window h3, .dark .pm-log, .dark .newsentry {
	border-color: #5A5A5A;
}
.userlist-minimized {
	height: 21px;
	bottom: auto;
	overflow: hidden;
	background: #EEF2F5;
	border-bottom: 1px solid #AAAAAA;
}
.userlist-maximized {
	height: auto;
	bottom: 0;
	overflow: auto;
	background: #EEF2F5;
}
.userlist-minimized .userlist-count,
.userlist-maximized .userlist-count {
	cursor: pointer;
}
.userlist-minimized .userlist-count:hover,
.userlist-maximized .userlist-count:hover,
.pm-buttonbar button:hover {
	background: #DEE4EA;
}
.chat-log.hasuserlist,
.chat-log-add.hasuserlist,
.tournament-wrapper.hasuserlist {
	left: 146px;
}
.chat-log:not(.hasuserlist) .inner {
	padding-top: 28px;
}
.userlist,
.userlist li {
	display: block;
	list-style-type: none;
	margin: 0;
	padding: 0;
	text-align: left;
}
.userlist li {
	height: 20px;
	font: 10pt Verdana, sans-serif;
	white-space: nowrap;
}
.userlist li em.group {
	font-style: normal;
	font-size: 8pt;
	color: #AAAAAA;
	display: block;
	float: left;
	text-align: center;
	padding: 1px 0 0 1px;
	width: 14px;
}
.userlist li button {
	box-sizing: border-box;
	display: block;
	overflow: hidden;
	height: auto;
	background: transparent;
	border: 0;
	padding: 1px 0;
	margin: 0;
	height: 20px;
	width: 100%;
	white-space: nowrap;
	font: 9pt Verdana, sans-serif;
	text-align: left;
}
/* Remove Firefox's magic padding */
.userlist li button::-moz-focus-inner {
	padding: 0;
}
.userlist li button:hover {
	background: #dce4ec;
}
.userlist li button:active {
	background: #ccd4dc;
}
.userlist li.cur {
	background: white;
}
.userlist li.cur button,
.userlist li.cur button:hover {
	background: white;
	margin: 0 0 0 -1px;
}

/*********************************************************
 * Battle
 *********************************************************/

.ps-room .battle-userlist {
	left: 641px;
}
.ps-room .battle-log {
	position: absolute;
	top: 0;
	left: 640px;
	right: 0;
	bottom: 40px;
	height: auto;
	width: auto;

	word-wrap: break-word;
	border-right: 0;
	border-top: 0;
	border-bottom: 0;
}
.ps-room .battle-log-add {
	position: absolute;
	bottom: 0;
	left: 640px;
	right: 0;
	top: auto;
	min-height: 36px;
	height: auto;
	width: auto;

	padding: 3px 4px 0 4px;
	border-right: 0;
	border-bottom: 0;
}
.ps-room .battle {
	border-top: 0;
	border-left: 0;
	border-right: 0;
	top: 0;
	left: 0;
	transform-origin: top left;
	-webkit-transform-origin: top left;
}
.ps-room .foehint {
	transform-origin: top left;
	-webkit-transform-origin: top left;
}
.ps-room .battle-controls {
	position: absolute;
	top: 370px;
	left: 0;
	width: 640px;
	background: #EEF2F5;
}
.ps-room .ally-pokemon {
	position: absolute;
	top: 280px;
	left: 0;
	width: 640px;
	background: #EEF2F5;
}
.battle-chat-toggle {
	display: none;
}
.tiny-layout.ps-room .battle-controls {
	left: 0;
	right: 0;
	width: auto;
}
.tiny-layout .movecontrols, .tiny-layout .shiftcontrols, .tiny-layout .switchcontrols {
	max-width: 330px;
	margin: 0 auto;
}
.timerbutton {
	float: right;
}
.timerbutton-on,
.timerbutton-on:hover {
	color: #992222;
	border-color: #992222;
}
.timerbutton-on:hover {
	border-color: #661111;
}
.timerbutton-critical,
.timerbutton-critical:hover {
	color: #ffffff;
	font-weight: bold;
	border-color: #BB2222;
	background: #BB2222;
	text-shadow: none;
}
.dark .timerbutton-on,
.dark .timerbutton-on:hover {
	color: #EE6666;
	border-color: #EE6666;
}
.dark .timerbutton-critical,
.dark .timerbutton-critical:hover {
	color: #ffffff;
	font-weight: bold;
	border-color: #BB2222;
	background: #BB2222;
	text-shadow: none;
}

.battle-controls p {
	margin: 2px 0 8px 0;
	padding: 0 8px;
}
.battle-controls .whatdo {
	margin-top: -2px;
	padding: 0 8px;
	font-size: 9pt;
	color: #555555;
}
.battle-controls .whatdo small {
	padding: 1px 2px;
	border: 1px solid #999999;
	border-radius: 4px;
}
.battle-controls .whatdo small.weak {
	color: #AAAA22;
	border-color: #AAAA22;
}
.battle-controls .whatdo small.critical {
	color: #EE4433;
	border-color: #EE4433;
}
.small-layout .battle-userlist,
.small-layout .battle-log,
.small-layout .battle-log-add {
	display: none;
}
.small-layout .battle-chat-toggle {
	display: block;
	position: absolute;
	top: 4px;
	left: 151px;
	font-size: 14px;
	padding: 3px 6px;
}
.small-layout .battle-chat-toggle[name=showChat] {
	left: auto;
	right: 6px;
}
.small-layout.showing-chat .battle,
.small-layout.showing-chat .battle-controls {
	display: none;
}
.small-layout.showing-chat .battle-userlist,
.small-layout.showing-chat .battle-log,
.small-layout.showing-chat .battle-log-add {
	left: 0;
	display: block;
}
.allyTeam button,
.shiftselect button,
.moveselect button,
.switchselect button {
	background: transparent;
	border: 0;
	font-weight: bold;
	font-style: italic;
	color: #555555;
	font-size: 12pt;
	display: block;
	margin: 0;
	padding: 9px 7px 0 7px;
}
.shiftselect button {
	color: #445588;
	cursor: default;
}
.moveselect button {
	color: #884422;
	cursor: default;
}
.switchselect button {
	color: #445588;
	cursor: default;
}
.allyparty button,
.switchmenu button {
	position: relative;
	display: block;
	float: left;
	width: 102px;
	min-height: 30px;
	margin-right: 4px;
	font: 9pt Verdana, sans-serif;
	padding: 5px 5px 5px 0;
	white-space: pre;
	overflow: hidden;
}
.allyparty button .picon,
.switchmenu button .picon {
	float: left;
	margin: -6px -3px -6px -4px;
	opacity: 0.8;
}

.allyparty button .hpbar,
.switchmenu button .hpbar {
	position: absolute;
	display: block;
	border: 1px solid #AAA;
	background: #EEE;
	height: 2px;
	bottom: 2px; left: 4px; right: 2px;
	border-radius: 2px;
	opacity: .8;
}

/* The declaration order of these three hpbar* classes is significant. */

.allyparty button .hpbar span,
.switchmenu button .hpbar span {
	display: block;
	height: 1px;
	background: #0A6;
	border-top: 1px solid #3C0;
	border-radius: 1px;
}

.allyparty button .hpbar-yellow span,
.switchmenu button .hpbar-yellow span {
	border-top-color: #a5aa53;
	background-color: #a2a822;
}

.allyparty button .hpbar-red span,
.switchmenu button .hpbar-red span {
	border-top-color: #faa;
	background-color: #f55;
}

/****************/

.allyparty button .status,
.switchmenu button .status {
	position: absolute;
	display: block;
	right: 2px;
	bottom: 1px;
	width: 5px;
	height: 5px;
	padding: 0;
	border-radius: 2px;
	border: 1px solid #C2C2C2;
	opacity: 1.0;
}
.status {
	color: white;
	border-radius: 3px;
	padding: 0 2px;
}
.status.brn {
	background: #EE5533;
}
.status.psn, .status.tox {
	background: #A4009A;
}
.status.par {
	background: #9AA400;
}
.status.slp {
	background: #AA77AA;
}
.status.frz {
	background: #009AA4;
}

.movebutton {
	float: left;
	display: block;
	width: 155px;
	margin-right: 4px;
	height: 40px;
	font: 10pt/100% Verdana, sans-serif;
	position: relative;
	padding:  6px 4px 0 4px;
}
.movebutton small {
	color: #777777;
}
.movebutton small.type {
	padding-top: 3px;
	float: left;
	font-size: 8pt;
}
.movebutton small.pp {
	padding-top: 2px;
	float: right;
	font-size: 8pt;
}
.megaevo-box {
	clear: both;
	padding-top: 10px;
	text-align: center;
}
.megaevo {
	display: inline-block;
	vertical-align: middle;
	width: 180px;
	margin: 2px;
	padding: 2px;
	text-align: center;

	cursor: pointer;
	border: 1px solid #BBB;
	border-radius: 3px;
	color: #333;
	background: transparent;
	font-size: 10pt;
	font-weight: bold;
}
.megaevo:hover {
	border-color: #888;
	background: #E5E5E5;
	color: black;
}
.dark .megaevo {
	color: #EEE;
	border-color: #888;
}
.dark .megaevo:hover {
	color: #FFF;
	background: #333;
	border-color: #BBB;
}
.megaevo:has(:checked),
.dark .megaevo:has(:checked) {
	text-shadow: -1px -1px 0 #FFF, 1px 1px 0 #FFF, -1px 1px 0 #FFF, 1px -1px 0 #FFF;
	color: black;
  background-image: linear-gradient(120deg,
		hsl(0, 100%, 75%) 0%,
		hsl(36, 100%, 75%) 10%,
		hsl(64, 100%, 75%) 20%,
		hsl(118, 100%, 83%) 30%,
		hsl(179, 100%, 80%) 40%,
		hsl(188, 100%, 79%) 50%,
		hsl(212, 100%, 77%) 60%,
		hsl(260, 100%, 77%) 70%,
		hsl(284, 100%, 76%) 80%,
		hsl(308, 100%, 76%) 90%,
		hsl(0, 100%, 75%) 100%
	);
}
.movewarning {
	clear: both;
	display: block;
	font-size: 10pt;
	padding: 8px 0 5px;
}
.allyparty,
.switchmenu,
.movemenu {
	display: block;
	margin-right: -10px;
	padding-left: 4px;
}
.allyparty button,
.switchmenu button,
.movebutton {
	position: relative;
	outline: none;
	text-align: center;
	text-decoration: none;
	text-shadow: 0 1px 0 rgba(255,255,255,.4);
	border-radius: 5px;
	margin-top: 4px;
	box-shadow: 0 1px 2px rgba(0,0,0,.2), inset 0 -1px 2px rgba(255,255,255,1);

	/* default colors */
	color: #000000;
	border: solid 1px #AAAAAA;
	background: #e3e3e3;
	background: linear-gradient(to bottom,  #f6f6f6,  #e3e3e3);
}
.allyparty button:hover,
.switchmenu button:hover,
.movebutton:hover {
	background: #cfcfcf;
	background: linear-gradient(to bottom,  #f2f2f2,  #cfcfcf);
	border-color: #606060;
}
.allyparty button:active,
.switchmenu button:active,
.movebutton:active,
.switchmenu button.pressed,
.movebutton.pressed {
	background: linear-gradient(to bottom,  #cfcfcf,  #f2f2f2);
}

.allyparty button.disabled,
.allyparty button:disabled,
.switchmenu button.disabled,
.switchmenu button:disabled,
.movebutton:disabled {
	cursor: default;
	background: #F3F3F3 !important;
	border-color: #CCCCCC !important;
	-webkit-box-shadow: none !important;
	-moz-box-shadow: none !important;
	box-shadow: none !important;
	color: #777777 !important;
}

@media (max-height:570px) and (min-width: 440px) {
	/*
	 * This is the black move/switch menu for low-res screens
	 */

	.controls {
		position: absolute;
		bottom: 10px;
		left: 0;
		right: 0;
		width: auto;
		background: #444444;
		background: rgba(40,40,40,.85);
		color: #FFFFFF;
		padding: 4px 8px;
	}
	.battle-controls .whatdo {
		color: #FFFFFF;
	}
	.battle-controls .whatdo small.weak {
		color: #DDDD55;
		border-color: #DDDD55;
	}
	.battle-controls .whatdo small.critical {
		color: #FF7766;
		border-color: #FF7766;
	}
	.battle-controls .movecontrols, .battle-controls .shiftcontrols, .battle-controls .switchcontrols {
		max-width: 640px;
	}
	.movemenu {
		display: none;
		padding: 0 75px 0 85px;
	}
	.allyparty,
	.switchmenu {
		display: none;
		max-width: 325px;
		padding: 0 75px 0 85px;
		margin: 0 0 0 auto;
	}
	.moveselect {
		position: absolute;
		left: 20px;
		bottom: 20px;
	}
	.allyTeam,
	.switchselect {
		position: absolute;
		right: 20px;
		bottom: 20px;
	}
	.shiftselect {
		position: absolute;
		right: 150px;
		bottom: 20px;
	}
	.moveselect button, .switchselect button, .shiftselect button {
		padding: 4px 8px;
		border-radius: 6px;
		background: #E5E5E5;
	}
	.megaevo-box {
		text-align: left;
	}

	.battle-controls .whatdo {
		padding-bottom: 50px;
	}
	.battle-controls .move-controls .whatdo,
	.battle-controls .switch-controls .whatdo {
		padding-bottom: 5px;
	}
	.move-controls .movemenu,
	.switch-controls .switchmenu {
		display: block;
		margin-right: 0;
	}
	.move-controls .moveselect button,
	.switch-controls .switchselect button,
	.shiftselect button {
		background: #BBBBBB;
	}
	.controls .timer {
		float: right;
		margin-top: -25px;
	}
}

/*********************************************************
 * Teambuilder
 *********************************************************/

.folderpane {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	padding: 0;
	border-left: 5px solid #d7e3ec;
	width: 154px;
	overflow: auto;
	overflow-x: hidden;
}
.teampane {
	position: absolute;
	left: 159px;
	top: 0;
	right: 0;
	bottom: 0;
	padding: 5px 0 5px 8px;
	overflow: auto;
}
@media (max-width:649px) {
	.folderpane {
		display: none;
	}
	.teampane {
		left: 0;
	}
}

.folderlist {
	height: 100%;
	width: 154px;
	display: table;
	margin: 0;
	padding: 0;
	border: 0;
}
.folderlist .folder,
.folderlist .foldersep {
	display: table-row;
	margin: 0;
	padding: 0;
	border: 0;
	height: 30px;
}
.folderlist .foldersep {
	height: 15px;
}
.folderlist .foldersep:before {
	display: table-cell;
	height: 15px;
	background: #d7e3ec;
	border-right: 1px solid #888888;
	content: '';
}
.folderlistafter {
	display: table-row;
	margin: 0;
	padding: 0;
	border: 0;
	height: auto;
}
.folderlistbefore {
	display: table-row;
	margin: 0;
	padding: 0;
	border: 0;
	height: 12px;
	content: '';
}
.folderlistafter:before,
.folderlistbefore:before {
	display: table-cell;
	background: #d7e3ec;
	margin: 0;
	padding: 0;
	border: 0;
	border-right: 1px solid #888888;
	content: '';
}

.folderpane i {
	display: inline-block;
	width: 16px;
	color: #777777;
}
.folderpane .text,
.folderpane h3 {
	margin: 0;
	padding: 13px 0 0 0;
	height: 17px;
	font-size: 9pt;
	background: #d7e3ec;
	color: black;
	border-right: 1px solid #888888;
}
.folderpane .text {
	height: 23px;
	padding: 7px 0 0 7px;
}
.folder .selectFolder {
	display: block;
	padding: 0 0 0 7px;
	border: 0;
	border-right: 1px solid #888888;
	background: #d7e3ec;
	color: black;
	width: auto;
	max-width: 146px; /* I have no idea why this is required and width doesn't work */
	padding-top: 7px;
	height: 23px;
	font-size: 9pt;
	font-family: Verdana, sans-serif;
	white-space: nowrap;
	overflow: hidden;
	text-align: left;
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
}
.folder .selectFolder:hover {
	background: #c7d3dc;
}
.folder .selectFolder:active {
	background: #b7c3cc;
}
.folder .selectFolder.active {
	background: #27333c;
	color: white;
}
.folder.cur .selectFolder,
.folder.cur .selectFolder:hover,
.folder.cur .selectFolder:active {
	padding-top: 6px;
	height: 22px;
	cursor: default;
	background: transparent;
	color: black;
	border-top: 1px solid #888888;
	border-bottom: 1px solid #888888;
	border-left: 1px solid #888888;
	border-right: 0;
	padding-left: 6px;
	border-top-left-radius: 3px;
	border-bottom-left-radius: 3px;
	text-decoration: none;
}

/* believe me, there was no other way to do this */
.folderhack1,
.folderhack2 {
	position: absolute;
	display: block;
	left: 0;
	width: 1px;
	height: 1px;
	background: #d7e3ec;
	content: '';
}
.folderhack1 {
	top: 0;
}
.folderhack2 {
	bottom: 0;
}
.folderhack3 {
	position: relative;
	height: 30px;
}

.teamlist {
	list-style: none;
	margin: 0;
	padding: 0;
}
.teamlist li {
	margin: 3px 0;
	padding: 0;
	/* lazy windowing */
	content-visibility: auto;
	contain-intrinsic-size: 49px;
	contain-intrinsic-size: auto none auto 49px;
}

.teamlist .team {
	display: inline-block;
	width: 350px;
	vertical-align: middle;
}
.teamlist .dragging button {
	visibility: hidden;
}
.teamlist .dragging .team {
	opacity: 0.4;
}
.teamlist .team .picon span {
	font-size: 9px !important;
	display: block;
	position: relative;
	width: 32px;
	top: 22px;
	color: transparent;
}
.teamedit {
	position: absolute;
	display: block;
	top: 45px;
	left: 10px;
	right: 16px;
	bottom: 16px;
	width: auto;
	height: auto;
	text-align: left;
	font-size: inherit;
	font-family: inherit;
}
.teamedit textarea {
	width: 100%;
	height: 100%;
}

.teamwrapper {
	transform-origin: top left;
	-webkit-transform-origin: top left;
}

.teambar {
	position: absolute;
	top: 0;
	left: 92px;
	min-width: 540px;
}
.teambar button {
	display: block;
	background: #F3F3F3;
	color: black;
	border: 1px solid #AAAAAA;
	padding: 0;
	margin: -1px 2px 0 0;
	height: 44px;
	float: left;
	width: 88px;
	white-space: pre;
	font-size: 8pt;
	font-family: Verdana, Arial, sans-serif;
	overflow: hidden;
}
.teambar button span {
	margin: -2px auto;
}
.teambar button:hover {
	background: #DCDCDC;
	border-color: #757575;
}
.teambar button:active {
	background: #CCCCCC;
	border-color: #373737;
}
.teambar button:disabled,
.teambar button:disabled:hover,
.teambar button:disabled:active {
	color: #000000;
	background: #FCFCFC;
	border-color: #AAAAAA;
	opacity: .5;
	cursor: default;
}
.teambar .picon {
	display: block;
}
.teamchart,
.teamchart li {
	list-style-type: none;
	display: block;
	margin: 0;
	padding: 0;
}
.teamchart {
	padding: 0 10px 10px 7px;
}
.teamchart li {
	padding-top: 20px;
	position: relative;
}
.teamchart li.format-select {
	padding: 4px 0 10px;
}
.teamchart li.format-select label {
	display: block;
	font-size: 8pt;
	font-weight: bold;
}
.teamchart li.format-select select,
.teamchart li.format-select option {
	margin-right: 5px;
}

.majorbutton {
	font-size: 14pt;
}

.setmenu {
	position: absolute;
	top: 5px;
	left: 130px;
	width: 503px;
	text-align: right;
}
.setmenu button,
.teamlist button {
	background: transparent;
	border: 1px solid transparent;
	border-radius: 4px;
	padding: 2px 5px;
	margin: 0;
	font-size: 9pt;
	font-family: Verdana, sans-serif;
}
.setmenu button:hover,
.teamlist button:hover {
	border-color: #888888;
	background: #D5D5D5;
}
.setmenu button i,
.teamlist button i {
	margin-right: 2px;
}
.setmenu-left {
	position: absolute;
	top: 5px;
	left: 5px;
	text-align: left;
}
.setchart-nickname {
	position: absolute;
	left: -4px;
	top: 5px;
	border: 1px solid #999999;
	background: #CBD6E1;
	border-radius: 5px;
	padding: 1px 0 0 0;
	width: 110px;

	box-shadow: inset 1px 1px 0 rgba(255,255,255,.6);
}
.setchart {
	border: 1px solid #999999;
	background: #DAE5F0 no-repeat scroll 10px 5px none;
	border-radius: 5px;
	padding: 2px 0 0 3px;
	height: 127px;
	width: 626px;
	margin-top: 8px;

	box-shadow: inset 1px 1px 0 rgba(255,255,255,.6);
}
.setcol {
	height: 127px;
	width: 112px;
	float: left;
}
.setcol-icon {
	background: transparent none no-repeat scroll center top;
}
.setcol-details {
	width: 234px;
}
.setcell {
	float: left;
}
.setcell-details {
	float: none;
}
.setcell-ability {
	float: right;
}
.setcol-details .itemicon {
	display: block;
	width: 24px;
	height: 24px;
	background-image: transparent none no-repeat scroll center center;
	opacity: 0.8;
}
.setrow-icons {
	height: 24px;
}
.setcell-typeicons {
	margin-top: 4px;
	margin-right: 4px;
	float:  right;
}
.setcell-typeicons img {
	margin-left: 1px;
}
.setcell-sprite {
	height: 82px;
	padding: 1px;
}
.typebg {
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.typebg-grass, .typebg-fairy { background-image: url(../fx/type-bg/forest-night.png); }
.typebg-fire { background-image: url(../fx/type-bg/flint.png); }
.typebg-water { background-image: url(../fx/type-bg/surf-day.png); }
.typebg-normal { background-image: url(../fx/type-bg/field-day.png); }
.typebg-dragon, .typebg-steel { background-image: url(../fx/type-bg/battle-tower.png); }
.typebg-dark { background-image: url(../fx/type-bg/rocky-night.png); }
.typebg-poison { background-image: url(../fx/type-bg/surf-night.png); }
.typebg-fighting { background-image: url(../fx/type-bg/battle-arcade.png); }
.typebg-psychic { background-image: url(../fx/type-bg/city-night.png); }
.typebg-rock { background-image: url(../fx/type-bg/rocky-day.png); }
.typebg-ground { background-image: url(../fx/type-bg/city-afternoon.png); }
.typebg-ghost { background-image: url(../fx/type-bg/distortion-world.png); }
.typebg-bug { background-image: url(../fx/type-bg/forest-afternoon.png); }
.typebg-ice { background-image: url(../fx/type-bg/snow-day.png); }
.typebg-electric { background-image: url(../fx/type-bg/indoor-1.png); }
.typebg-flying { background-image: url(../fx/type-bg/battle-factory.png); }
.setcell-sprite.typebg {
	position: relative;
	width: 102px;
	height: 68px;
	margin: 13px 0 1px 2px;
	padding: 2px;
	box-sizing: border-box;
	border-radius: 9px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(0, 0, 0, 0.28);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 1px 2px rgba(0, 0, 0, 0.18);
}
.setcell-sprite.typebg::before,
.mtc-model-wrap.typebg::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(26, 30, 36, 0.28);
	-webkit-backdrop-filter: contrast(0.76) saturate(0.84);
	backdrop-filter: contrast(0.76) saturate(0.84);
	pointer-events: none;
	z-index: 0;
}
.setcell-sprite-img {
	position: relative;
	z-index: 1;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	pointer-events: none;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.78)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}
.setcell-sprite.changeform i {
	position: absolute;
	right: 2px;
	bottom: 2px;
	margin: 0;
	z-index: 2;
}
.mobile-abil-prefix {
	display: none;
}
.setcell-pokemon {
	margin-top: 0;
}
.setcell-details {
	height: 60px;
}
.setcol-moves .setcell {
	padding-bottom: 1px;
}
.setchart label,
.setchart-nickname label {
	display: block;
	font-size: 8pt;
	font-weight: bold;
	color: #555555;
	padding-left: 2px;
}
.setcol-icon label {
	text-shadow: #DAE5F0 1px 1px 0, #DAE5F0 1px -1px 0, #DAE5F0 -1px 1px 0, #DAE5F0 -1px -1px 0;
}
.setchart-nickname label {
	font-size: 7pt;
	margin-bottom: -1px;
}
.setcol-moves {
	width: 137px;
}
.setcol-stats {
	width: 142px;
}
.setdetails, .setstats {
	display: block;
	box-sizing: border-box;
	-moz-box-sizing: border-box;
	border: 1px solid #AAAAAA;
	border-radius: 3px;
	padding: 1px;
	margin: 2px 2px 1px 1px;
	font-size: 7pt;

	box-shadow: inset 0px 1px 2px #CCCCCC, 1px 1px 0 rgba(255,255,255,.6);
	background: #F8FBFD;
	color: black;
}
.setdetails label, .setstats label {
	cursor: pointer;
}
.setdetails:hover, .setstats:hover {
	border-color: #474747;
	box-shadow: inset 0px 1px 2px #D2D2D2, 1px 1px 0 rgba(255,255,255,.6);
	background: #FFFFFF;
}
.setdetails:focus, .setstats:focus,
.dark .setdetails:focus, .dark .setstats:focus {
	border: 2px solid #004488;
	margin: 1px 1px 0 0;
	outline: 0 none;
}
.setdetails:active, .setstats:active {
	box-shadow: inset 0px 2px 2px #AAAAAA;
	background: #E4E9ED;
	border: 2px solid #004488;
	margin: 1px 1px 0 0;
	outline: 0 none;
}
.setdetails {
	width: 230px;
	height: 34px;
}
.setdetails:focus,.setdetails:active {
	width: 232px;
	height: 36px;
}
.setdetails .detailcell {
	border-left: 1px solid #CCCCCC;
	padding: 2px 4px;
	display: block;
	float: left;
	font-size: 9pt;
	text-align: center;
}
.setdetails .detailcell-first {
	border-left: 0;
}
.setchart .setdetails label {
	float: none;
	display: block;
	font-weight: normal;
	font-size: 7pt;
	text-align: center;
	padding: 0;
}
.setstats {
	width: 138px;
	height: 108px;
	padding-right: 0;
}
.setstats:focus,.setstats:active {
	width: 140px;
	height: 110px;
}
.statrow {
	display: block;
	height: 15px;
}
.setchart .setstats label {
	float: left;
	width: 20px;
	height: 5px;
	text-align: right;
	font-weight: normal;
	font-size: 7pt;
	padding: 0;
}
.setstats .statgraph {
	float: left;
	width: 75px;
	padding: 0 0 0 3px;
	height: 5px;
}
.setstats .statgraph span {
	display: block;
	margin-top: 3px;
	height: 6px;
	background: #CCCCCC;
}
.setstats em {
	float: left;
	font-style: normal;
	width: 22px;
	height: 5px;
	text-align: right;
}
.setstats small {
	float: left;
	font-size: 7pt;
}
.setstats .statrow-head em {
	color: #555555;
}
.teamnameedit {
	width: 300px;
}
.label {
	font-size: 9pt;
	font-weight: bold;
	display: block;
}
.optlabel {
	font-size: 9pt;
	display: block;
}
.label .textbox {
	display: block;
}
.setchart input,
.setchart-nickname input,
.statform input.inputform {
	display: block;
	padding: 1px;
	margin: 2px 3px 1px 1px;
	width: 104px;
	height: 20px;
}
.setchart input.incomplete {
	color: #CC3311;
	border-color: #CC3311;
}
.setchart .setcell-details input {
	width: 216px;
}
.setchart .setcell-item input {
	width: 98px;
	margin-right: 0px;
}
.setchart .setcell-ability input {
	width: 120px;
	margin-left: 0px;
	font-size: 8.5pt;
}
.setchart .setcol-moves input {
	width: 129px;
}

.teambuilder-clipboard-container {
	height: 58px;
	max-width: 463px;
	font-size: 8pt;
	padding: 4px;
	position: relative;
	margin: auto;

	border: 1px solid #FFAA00;
	border-radius: 5px;
}
.teambuilder-clipboard-title {
	width: 74px;
	padding-top: 8px;
	font-weight: bold;

	position: absolute;
	bottom: 4px;
	left: 8px;
}
.teambuilder-clipboard-data {
	display: block;
	width: 455px;
	height: 32px;
	overflow: hidden;
	cursor: pointer;

	border: 1px solid #999999;
	border-radius: 5px;
	background-image: linear-gradient(to bottom, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
	background-image: -o-linear-gradient(top, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
	background-image: -moz-linear-gradient(top, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
	background-image: -webkit-linear-gradient(top, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
	background-image: -ms-linear-gradient(top, rgb(218,229,240) 10%, rgb(203,214,225) 55%);
	outline: none;

	position: absolute;
	top: 4px;
	right: 8px;
	z-index: 2;
}
.dark .teambuilder-clipboard-data {
	color: #000000;
}
.teambuilder-clipboard-data:hover {
	border: 1px solid #BBBBBB;
}
.teambuilder-clipboard-data .result {
	height: 32px;
}
.teambuilder-clipboard-data span {
	display: block;
	height: 30px;

	float: left;
}
.teambuilder-clipboard-data .icon {
	width: 40px;
}
.teambuilder-clipboard-data .species {
	width: 100px;
	padding-top: 6px;
	margin-left: 1px;
}
.teambuilder-clipboard-data .ability-item {
	width: 98px;
	padding-left: 2px;
	margin-top: -1px;
}
.teambuilder-clipboard-data .moves {
	width: 100px;
	padding-left: 2px;
	margin-top: -1px;
}
.teambuilder-clipboard-data .section {
	height: 100%;
	padding: 1px;
	border-right: 1px solid #999999;
	float: left;
}
.teambuilder-clipboard-data .section.no-border {
	border: none;
}
.teambuilder-clipboard-buttons {
	display: block;
	width: 385px;

	position: absolute;
	top: 40px;
	right: 8px;
}
.teambuilder-clipboard-button-left {
	float: left;
	height: 22px;
}
.teambuilder-clipboard-button-right {
	float: right;
	height: 22px;
}
.teambuilder-results {
	position: absolute;
	top: 200px;
	left: 0;
	bottom: 0;
	right: 0;
	min-width: 640px;

	overflow-y: scroll;
	-webkit-overflow-scrolling: touch;
}
@media (max-height:410px) {
	.teambuilder-results {
		bottom: auto;
		overflow-y: visible;
		background: #EEF2F5;
		color: black;
	}
	.dark .teambuilder-results {
		background: #0E1215;
		color: #DDD;
	}
}
@media (max-width:639px) {
	.teambuilder-results {
		bottom: auto;
		overflow-y: visible;
		background: #EEF2F5;
		color: black;
	}
	.dark .teambuilder-results {
		background: #0E1215;
		color: #DDD;
	}
}

.teamchartbox {
	position: absolute;
	top: 42px;
	left: 0;
	bottom: 0;
	right: 0;
	border-top: 1px solid #AAAAAA;

	overflow: auto;
	-webkit-overflow-scrolling: touch;
}
.teamwrapper.scaled {
	width: 640px;
	height: 100%;
}
.teamwrapper.scaled .teamchartbox {
	bottom: auto;
}
.exportbutton {
	margin-left: 6px;
	margin-bottom: 3px;
}
.teamchartbox.individual {
	overflow: visible;
}
.teamchartbox.individual .teamchart {
	margin-top: -2px;
}
.teambuilder-results .result a {
	border-radius: 4px;
	cursor: pointer;
}
.teambuilder-results .result a.cur {
	border-color: #555555;
	background: rgba(248, 248, 248, 0.4);
}
.teambuilder-results .result a:hover,
.teambuilder-results .result a.hover {
	border-color: #D8D8D8;
	background: #F8F8F8;
}
.teambuilder-results .result a.cur:hover,
.teambuilder-results .result a.cur.hover {
	border-color: #555555;
	background: #F8F8F8;
}

.teambuilder-results .resultheader h3 {
	border-right: 0;
}

.teambuilder-pokemon-import {
	display: none;
	position: absolute;
	top: 206px;
	left: 10px;
	padding: 2px;
	overflow: hidden;
}

.pokemonedit {
	width: 626px;
	text-align: left;
	font-size: inherit;
	font-family: inherit;
}

.statform {
	padding: 3px 13px 10px 13px;
	font-size: 10pt;
}
.statform p.suggested {
	margin: 5px 0;
}
.statform .col > div {
	padding-top: 1px;
	height: 28px;
}
.statform .col div label,
.statform .col div em,
.statform .col div b {
	display: block;
	padding: 5px 0 0 0;
}
.statform .col {
	float: left;
	width: 52px;
	text-align: right;
	font-size: 9pt;
}
.statform .basestatscol {
	width: 38px;
}
.statform .statscol {
	width: 36px;
}
.statform .statscol em,
.statform .statscol b {
	font-style: normal;
	font-weight: bold;
}
.statform .graphcol {
	width: 185px;
}
.statform .graphcol div span {
	margin: 3px 0 0 5px;
	display: block;
	height: 8px;
	border-bottom: 1px solid #AAAAAA;
	border-right: 1px solid #AAAAAA;
	background: #CCCCCC;
}
.statform .evcol,
.statform .ivcol {
	width: 48px;
	text-align: center;
}
.statform .evslidercol {
	width: 193px;
	margin-right: 9px;
	margin-left: 5px;
	padding-top: 2px;
	text-align: center;
}
.evslider {
	width: 192px;
	margin: 0 auto;
}
.statform .totalev b {
	color: #DD2222;
}
.statform .totalev em {
	font-style: normal;
}
.statform input.numform {
	width: 40px;
	height: 16px;
	font-size: 9pt;
}

.detailsform .formrow {
	padding-left: 100px;
}
.detailsform .formrow .formlabel {
	float: left;
	margin-left: -100px;
	width: 110px;
	text-align: right;
}
.changeform i {
	cursor: pointer;
	display: block;
	margin: 70px 2px 0 auto;
	padding-left: 4px;
	padding-top: 2px;
	width: 12px;
	height: 14px;
	border: 1px solid #569;
	border-radius: 2px;
	color: #569;
	background: rgba(255,255,255,.5);
	box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.changeform i:hover {
	color: #DAE5F0;
	background: #569;
}
.altform {
	margin-left: 10px;
	margin-top: 4px;
}


/*********************************************************
 * Popups
 *********************************************************/

.ps-popup .label {
	width: 210px;
	margin: 0 auto;
}
.ps-popup .textbox {
	width: 200px;
}

.userstatus {
	font-style: italic;
	font-size: 8pt;
	word-wrap: break-word;
	overflow: hidden;
	max-height: 21pt;
	display: block;
}
.usergroup {
	color: #333;
	font-size: 8pt;
	font-weight: bold;
}

.userdetails {
	min-height: 80px;
	width: 191px;
	padding: 1px 1px 1px 86px;
	margin: 5px 0;
}
.userdetails img {
	float: left;
	margin-left: -85px;
}
.userdetails .rooms {
	font-size: 8pt;
}
.userdetails .offline {
	color: red;
}
.trainersprite.yours {
	cursor: pointer;
}
.buttonbar {
	clear: both;
}

.bglist {
	margin: 0 -7px;
}
.avatarlist button,
.formlist button,
.bglist button {
	display: block;
	float: left;
	margin: 2px;
	padding: 2px;
}
.avatarlist button, .dark .avatarlist button {
	width: 80px;
	height: 80px;
	background: transparent url(https://play.pokemonshowdown.com/sprites/trainers-sheet.png) no-repeat scroll 0px 0px;
}
.bglist button span {
	display: block;
	width: 144px;
	height: 90px;
	background: url(../fx/client-bgsheet.png) no-repeat scroll 0px 0px;
}
.formlist button {
	background-repeat: no-repeat;
}

.effect-volume,
.music-volume,
.notif-volume {
	min-height: 34px;
}
.effect-volume label,
.music-volume label,
.notif-volume label {
	font-size: 8pt;
}
.effect-volume em,
.music-volume em,
.notif-volume em {
	display: block;
	font-size: 9pt;
	padding-left: 5px;
	color: #555555;
}

.preview {
	float: right;
}

/*********************************************************
 * Dark mode!
 *********************************************************/

.dark .header {
	background: rgba(0,0,0,.30);
}

.dark .ps-room.ps-room-light,
.dark .tournament-box,
.dark .tournament-status,
.dark .tournament-toggle,
.dark .pm-log-add {
	background: rgba(0,0,0,.70);
	color: #DDD;
	border-color: #5A5A5A;
}

.dark .pm-log {
	background: rgba(0,0,0,.85);
	color: #DDD;
	backdrop-filter: blur(4px);
}

.dark .userlist-maximized {
	background: #333333;
	color: #DDD;
}
.dark .ps-room.ps-room-opaque,
.dark .battle-log-add,
.dark .battle-controls {
	background: #444444;
	color: #DDD;
}
.dark .userlist-minimized,
.dark .pm-buttonbar button {
	background: #444444;
	color: #4488EE;
}
.dark .userlist-minimized .userlist-count:hover,
.dark .userlist-maximized .userlist-count:hover,
.dark .pm-buttonbar button:hover {
	background: #666666;
}

.dark .moveselect button {
	color: #AA6644;
}
.dark .switchselect button {
	color: #6677AA;
}
.dark .whatdo {
	color: #999999;
}

.dark .chat-log {
	background: rgba(0,0,0,.5);
	color: #DDD;
	backdrop-filter: blur(4px);
}

.dark .userbar .username {
	color: #DDD;
	text-shadow: 1px 1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, -1px -1px 0 #000;
}

/* popups */

.dark .ps-popup {
	background: #0D151E;
	color: #DDD;
	border-color: #34373b;

	box-shadow: 2px 2px 3px rgba(0,0,0,.5), inset 0.5px 1px 1px rgba(255, 255, 255, 0.5);
}

.dark .usergroup {
	color: #BBB;
}

.dark .changeform i {
	border-color: #bbb;
	color: #bbb;
	background: rgba(0,0,0,.5);
}
.dark .changeform i:hover {
	border-color: #EEE;
	color: #EEE;
}

.dark .ps-overlay {
	background: rgba(40, 40, 40, .5);
}

/* main menu */

.dark .pm-window.focused h3,
.dark .pm-window.focused .pm-log,
.dark .pm-window.focused .pm-log-add {
	border-color: #CCC;
}

/* chat */

.dark .userlist strong,
.dark .userlist span {
	text-shadow: 1px 1px 0 #222222;
}
.dark .userlist li {
	border-bottom-color: #444;
}
.dark .userlist li button:hover {
	background: #222222;
}
.dark .userlist li button:active {
	background: black;
}

.dark .highlighted {
	background: rgba(120,220,255,0.25);
}
.dark .message-pm {
	color: #00af00;
}
.dark .revealed {
	background: rgba(0,255,200,0.18);
}
.dark .chat.mine {
	background: rgba(255,255,255,0.08);
}

/* teambuilder */

.dark .folderpane {
	border-left-color: #484848;
}

.dark .folderlist .foldersep:before,
.dark .folderlistafter:before,
.dark .folderlistbefore:before,
.dark .folderpane h3,
.dark .folderpane .text,
.dark .folder .selectFolder,
.dark .folderhack1,
.dark .folderhack2 {
	background: #484848;
	color: #ddd;
}

.dark .folder .selectFolder:hover {
	background: #686868;
}

.dark .folderpane i {
	color: #ddd;
}

.dark .folder .selectFolder.active,
.dark .folder .selectFolder:active {
	background: #27333c;
	color: white;
}

.dark .folder.cur .selectFolder {
	background: transparent;
}

/* teambuilder set */

.dark .teambar button {
	background: #5A6570;
	color: #F1F1F1;
	border: 1px solid #AAAAAA;
}

.dark .teambar button:hover {
	background: #444C54;
	color: #F1F1F1;
	border: 1px solid #AAAAAA;
}

.dark .teambar button:disabled, .dark .teambar button:disabled:hover, .dark .teambar button:disabled:active {
		color: #ffffff;
		background: #2d343a;
		border-color: #6bacc5;
		opacity: 1;
}

.dark .teambuilder-results .result a.hover,
.dark .teambuilder-results .result a:hover,
.dark .setmenu button:hover,
.dark .teamlist button:hover {
	border-color: #777777;
	background: rgba(100, 100, 100, 0.5);
	color: #FFFFFF;
}
.dark .teambuilder-results .result a.cur {
	border-color: #BBBBBB;
	background: rgba(100, 100, 100, 0.2);
}
.dark .teambuilder-results .result a.cur:hover {
	border-color: #BBBBBB;
	background: rgba(100, 100, 100, 0.4);
	color: #FFFFFF;
}

.dark .setmenu button,
.dark .teamlist button,
.dark .folder.cur .selectFolder,
.dark .utilichart .namecol,
.dark .utilichart .pokemonnamecol,
.dark .utilichart .movenamecol {
	color: #DDD;
}

.dark .setchart,
.dark .setchart-nickname {
	background-color: #5A6570;
	box-shadow: none;
}
.dark .setcol-icon label {
	text-shadow: #5A6570 1px 1px 0,#5A6570 1px -1px 0,#5A6570 -1px 1px 0,#5A6570 -1px -1px 0;
}
.dark .setchart label,
.dark .setchart-nickname label,
.dark .setchart .statrow-head em {
	color: #BBB;
}

/* for testclient */
.dark iframe.textbox,
.dark iframe.textbox:hover,
.dark iframe.textbox:focus {
	background: #DDDDDD;
}

/*********************************************************
 * Mobile Responsive (Option A)
 *********************************************************/

/* Floating Battle <-> Chat toggle on narrow layouts */
.small-layout .battle-chat-toggle {
	z-index: 30;
	border-radius: 20px;
	font-weight: bold;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.small-layout .battle-chat-toggle[name=showChat] {
	top: auto;
	left: auto;
	bottom: calc(12px + env(safe-area-inset-bottom));
	right: 12px;
	min-height: 38px;
	padding: 8px 16px;
}
.small-layout.showing-chat .battle-chat-toggle[name=hideChat] {
	top: 6px;
	right: 8px;
	bottom: auto;
	left: auto;
	padding: 5px 12px;
}
.small-layout.ps-room.showing-chat .battle-log {
	top: 0;
	left: 0;
	right: 0;
	bottom: calc(48px + env(safe-area-inset-bottom));
	padding-top: 38px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-sizing: border-box;
}
.small-layout.ps-room.showing-chat .battle-log-add {
	left: 0;
	right: 0;
	bottom: 0;
	height: auto;
	min-height: 44px;
	padding-bottom: calc(4px + env(safe-area-inset-bottom));
	box-sizing: border-box;
}
.ps-room.inline-chat {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.ps-room.inline-chat .battle {
	z-index: 2;
}
.ps-room.inline-chat .battle-controls {
	order: 1;
	position: static;
	flex: 0 0 auto;
	width: 100%;
	max-height: min(340px, 52dvh);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 6px 0 8px 0;
	border-bottom: 1px solid #999;
	box-sizing: border-box;
}
.dark .ps-room.inline-chat .battle-controls {
	border-bottom-color: #5a5a5a;
}
.ps-room.inline-chat .battle-log {
	order: 3;
	display: block;
	position: relative;
	top: auto;
	left: auto;
	right: auto;
	bottom: auto;
	z-index: 1;
	flex: 1 1 0;
	min-height: 110px;
	width: 100%;
	border: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	overscroll-behavior: contain;
	box-sizing: border-box;
}
.ps-room.inline-chat .battle-log-add {
	order: 4;
	display: block;
	position: static;
	flex: 0 0 auto;
	width: 100%;
	min-height: 42px;
	padding: 4px 6px calc(4px + env(safe-area-inset-bottom)) 6px;
	border-left: 0;
	box-sizing: border-box;
}
.ps-room.inline-chat .battle-chat-toggle,
.ps-room.inline-chat .battle-userlist,
.ps-room.inline-chat .battle-log-options,
.tiny-layout .battle-log-options {
	display: none;
}
.battle-scroll-bottom {
	display: none;
}
.ps-room.inline-chat .battle-scroll-bottom {
	position: absolute;
	right: 12px;
	bottom: calc(46px + max(4px, env(safe-area-inset-bottom)));
	z-index: 12;
	width: 46px;
	height: 46px;
	border-radius: 12px;
	background: #6d6d74;
	border: 2px solid #595959;
	color: #ffffff;
	font-size: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	cursor: pointer;
	will-change: transform;
	transform: translate3d(calc(100% + 28px), 0, 0);
	pointer-events: none;
	transition: transform 0.28s ease-in-out;
}
.ps-room.inline-chat .battle-scroll-bottom.visible {
	transform: translate3d(0, 0, 0);
	pointer-events: auto;
}
.switch-collapse-wrap {
	display: none;
}
.ps-room.inline-chat .movecontrols.switch-collapsed,
.ps-room.inline-chat .shiftcontrols.switch-collapsed,
.ps-room.inline-chat .switchcontrols.switch-collapsed,
.ps-room.inline-chat .targetmenu.switch-collapsed {
	display: none;
}
.dark .tablist .button.notifying,
.dark .tablist .button.notifying:hover,
.dark .tablist .button.notifying:active,
.dark .tablist .button.alt-notifying,
.dark .tablist .button.alt-notifying:hover,
.dark .tablist .button.alt-notifying:active,
.dark .tablist .button.subtle-notifying {
	background: #2b2c31;
	background: linear-gradient(to bottom, #393d46, #2b2c31);
	border-color: #34373b;
	color: #F9F9F9;
}
.dark .tablist .button.cur,
.dark .tablist .button.cur:hover,
.dark .tablist .button.cur.notifying,
.dark .tablist .button.cur.notifying:hover,
.dark .tablist .button.cur.alt-notifying,
.dark .tablist .button.cur.alt-notifying:hover,
.dark .tablist .button.cur.subtle-notifying {
	background: #5a5f6c;
	background: linear-gradient(to bottom, #6a6f7d, #525763);
	border-color: #848a98;
	color: #ffffff;
}
.ps-room.inline-chat .switch-collapse-wrap.has-switch-toggle {
	order: 2;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 0;
	overflow: visible;
	z-index: 6;
	flex: 0 0 auto;
}
.ps-room.inline-chat .switch-collapse-btn {
	width: calc(100% - 36px);
	max-width: 360px;
	height: 22px;
	border-radius: 11px;
	background: #6d6d74;
	border: 2px solid #595959;
	color: #ffffff;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
}

/* Playback seeking controls */
.playback-controls {
	padding: 4px 8px;
	box-sizing: border-box;
}
.playback-controls.playback-player {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}
.playback-row-top,
.playback-row-bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 6px;
}
.playback-row-bottom {
	margin-bottom: 0;
}
.playback-controls .timerbutton {
	float: none;
}
.playback-controls .button {
	border-radius: 4px;
	margin: 0;
}

/* Post-game replay/rematch layout */
.postgame-controls {
	padding: 4px 8px;
	box-sizing: border-box;
}
.postgame-row-top,
.postgame-row-bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 8px;
	align-items: stretch;
}
.postgame-row-bottom {
	margin-bottom: 0;
}
.postgame-row-top .button,
.postgame-row-bottom .button {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 6px 12px;
	box-sizing: border-box;
}
.postgame-row-bottom .button {
	flex-direction: row;
	gap: 6px;
}

/* Scrollable battle controls and 2x2 / 3x2 touch grids on narrow viewports */
.tiny-layout.ps-room .battle-controls {
	bottom: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: calc(68px + env(safe-area-inset-bottom));
	box-sizing: border-box;
}
.tiny-layout.ps-room.inline-chat .battle-controls {
	padding-bottom: 16px;
}
.tiny-layout .playback-controls {
	padding: 4px 8px;
	box-sizing: border-box;
}
.tiny-layout .playback-controls.playback-player {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	align-items: stretch;
}
.tiny-layout .playback-controls.playback-player .button,
.tiny-layout .playback-controls.playback-player .timerbutton {
	float: none;
	width: 100%;
	min-width: 0;
	min-height: 36px;
	margin: 0;
	padding: 6px 3px;
	font-size: 11.5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	box-sizing: border-box;
	white-space: nowrap;
}
.tiny-layout .playback-row-top {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 6px;
	margin-bottom: 6px;
}
.tiny-layout .playback-row-bottom {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin-bottom: 0;
}
.tiny-layout .playback-row-top .button {
	width: 100%;
	min-width: 0;
	min-height: 46px;
	margin: 0;
	padding: 5px 2px;
	font-size: 11px;
	line-height: 1.25;
	box-sizing: border-box;
	border-radius: 4px;
}
.tiny-layout .playback-row-bottom .button {
	width: 100%;
	min-width: 0;
	min-height: 36px;
	margin: 0;
	padding: 6px 6px;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	box-sizing: border-box;
	border-radius: 4px;
}
.tiny-layout .postgame-controls {
	padding: 4px 8px;
	box-sizing: border-box;
}
.tiny-layout .postgame-row-top {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin-bottom: 6px;
}
.tiny-layout .postgame-row-top:has(> :nth-child(2):last-child) {
	grid-template-columns: 1fr 1fr;
}
.tiny-layout .postgame-row-bottom {
	display: grid;
	grid-template-columns: 1fr;
	gap: 6px;
	margin-bottom: 0;
}
.tiny-layout .postgame-row-top .button {
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 6px 4px;
	font-size: 11px;
	line-height: 1.25;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}
.tiny-layout .postgame-row-top .button small {
	font-size: 9.5px;
}
.tiny-layout .postgame-row-bottom .button {
	width: 100%;
	min-height: 36px;
	margin: 0;
	padding: 6px 4px;
	font-size: 11px;
	line-height: 1.2;
	box-sizing: border-box;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 5px;
}
.tiny-layout .movecontrols,
.tiny-layout .shiftcontrols,
.tiny-layout .switchcontrols {
	max-width: 100%;
	padding: 0 8px;
	box-sizing: border-box;
}
.tiny-layout .movemenu {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin-right: 0;
	padding-left: 0;
}
.tiny-layout .movebutton {
	float: none;
	width: 100%;
	height: auto;
	min-height: 46px;
	margin: 0;
	padding: 6px 8px 5px;
	font-size: 13px;
	line-height: 1.25;
	box-sizing: border-box;
}
.tiny-layout .switchmenu,
.tiny-layout .allyparty {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin-right: 0;
	padding-left: 0;
}
.tiny-layout .switchmenu:has(> button:nth-child(4):last-child),
.tiny-layout .allyparty:has(> button:nth-child(4):last-child),
.tiny-layout .switchmenu:has(> button:nth-child(2):last-child),
.tiny-layout .allyparty:has(> button:nth-child(2):last-child) {
	grid-template-columns: 1fr 1fr;
}
.tiny-layout .switchmenu button,
.tiny-layout .allyparty button {
	float: none;
	width: 100%;
	min-height: 40px;
	margin: 0;
	padding: 4px 4px 6px 2px;
	font-size: 11px;
	box-sizing: border-box;
	text-overflow: ellipsis;
}
.tiny-layout .megaevo {
	width: auto;
	min-width: 170px;
	padding: 8px 14px;
	font-size: 13px;
}
.tiny-layout .whatdo {
	font-size: 12px;
	line-height: 1.4;
	padding: 4px 8px;
}
.whatdo.team-whatdo {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
	padding: 2px 8px 6px 8px;
}
.whatdo.team-whatdo .timerbutton {
	float: none;
	flex: 0 0 auto;
}
.team-lead-title {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 28px;
	font-size: 16px;
	font-weight: 600;
	font-style: normal;
	line-height: 28px;
	color: #222222;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.dark .team-lead-title {
	color: #ffffff;
}
.whatdo-title {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	min-width: 0;
}
.whatdo-picon {
	flex: 0 0 auto;
	margin: -4px -10px -4px -8px;
}
.whatdo-sep {
	flex: 0 0 auto;
	opacity: 0.55;
	font-weight: normal;
}
.whatdo-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.whatdo-left {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}
.whatdo-left .team-lead-title {
	width: 100%;
	flex: 0 0 auto;
}
.whatdo-subrow {
	display: flex;
	align-items: center;
	max-width: 100%;
	min-width: 0;
}
.team-selected-strip {
	flex-wrap: nowrap;
	gap: 6px;
	padding-top: 2px;
}
.team-selected-item {
	display: inline-flex;
	align-items: center;
	gap: 0;
	font-size: 13px;
	font-weight: 700;
	color: #333333;
	line-height: 22px;
}
.dark .team-selected-item {
	color: #d0d4dc;
}
.team-selected-picon {
	margin: -5px -6px -5px -4px;
	transform: scale(0.85);
	transform-origin: center center;
}
.prev-action-summary {
	gap: 3px;
	width: 100%;
	font-size: 12px;
	font-weight: 700;
	line-height: 22px;
	color: #555555;
}
.dark .prev-action-summary {
	color: #b8bcc4;
}
.prev-action-picon {
	transform: scale(0.82);
	transform-origin: center center;
	margin: -5px -10px -5px -9px;
}
.wait-summary {
	gap: 4px;
	padding-top: 2px;
}
.wait-choice-line {
	font-size: 12.5px;
	line-height: 1.5;
	color: #222222;
	word-wrap: break-word;
}
.dark .wait-choice-line {
	color: #e2e6ec;
}
.wait-picon {
	display: inline-block;
	vertical-align: middle;
	margin: -8px -9px -8px -10px;
	transform: scale(0.72);
	transform-origin: center center;
}
.wait-status {
	font-size: 12px;
	line-height: 1.35;
	color: #666666;
	margin-top: 2px;
}
.dark .wait-status {
	color: #a8aeb8;
}
.whatdo-actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4px;
	flex: 0 0 auto;
}
.whatdo-actions .timerbutton,
.whatdo-actions .backbutton {
	float: none;
	width: 100%;
	min-width: 114px;
	height: 28px;
	margin: 0;
	padding: 0 10px;
	font-size: 12.5px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	box-sizing: border-box;
	white-space: nowrap;
}
.switch-empty-notice {
	text-align: center;
	color: #666666;
	font-size: 12.5px;
	padding: 8px 8px 2px 8px;
}
.dark .switch-empty-notice {
	color: #b0b3b8;
}
.tiny-layout .battle-controls p button {
	min-height: 36px;
	padding: 6px 12px;
	font-size: 13px;
}

/* Target selection field grid & matching Back/Timer header */
.whatdo.target-whatdo {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0 0 6px 0;
	padding: 2px 8px;
}
.whatdo.target-whatdo .timerbutton {
	float: none;
	flex: 0 0 auto;
}
.backbutton {
	flex: 0 0 auto;
}
.target-title {
	flex: 1 1 auto;
	text-align: center;
	font-weight: bold;
	font-size: 11pt;
	color: #444444;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.dark .target-title {
	color: #E5E5E5;
}
.targetmenu {
	max-width: 520px;
	margin: 4px auto 0 auto;
	padding: 0 8px 6px 8px;
	box-sizing: border-box;
}
.targetrow {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 8px;
}
.targetrow:last-child {
	margin-bottom: 0;
}
.targetrow:has(> .target-btn:nth-child(3)) {
	grid-template-columns: repeat(3, 1fr);
}
.target-btn {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 6px 8px;
	border: 1px solid #AAAAAA;
	border-radius: 6px;
	background: #f2f3f3;
	color: #222222;
	font-family: Verdana, Helvetica, Arial, sans-serif;
	font-size: 11px;
	font-weight: normal;
	cursor: pointer;
	box-sizing: border-box;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
	overflow: hidden;
}
.target-btn:hover:not(:disabled) {
	border-color: #606060;
	background: #e6e8ea;
}
.target-btn:active:not(:disabled) {
	background: #dcdedf;
}
.target-btn.target-right {
	flex-direction: row-reverse;
}
:root {
	--target-foe-color: #e04848;
	--target-user-color: #48c068;
}
.target-btn.target-foe.target-left {
	border-left: 6px solid var(--target-foe-color, #e04848);
}
.target-btn.target-foe.target-right {
	border-right: 6px solid var(--target-foe-color, #e04848);
}
.target-btn.target-ally.target-left {
	border-left: 6px solid var(--target-user-color, #48c068);
}
.target-btn.target-ally.target-right {
	border-right: 6px solid var(--target-user-color, #48c068);
}
.target-btn.target-foe.target-mid {
	border-top: 4px solid var(--target-foe-color, #e04848);
}
.target-btn.target-ally.target-mid {
	border-bottom: 4px solid var(--target-user-color, #48c068);
}
html.target-foe-bar-off .target-btn.target-foe.target-left {
	border-left: 1px solid #AAAAAA;
}
html.target-foe-bar-off .target-btn.target-foe.target-right {
	border-right: 1px solid #AAAAAA;
}
html.target-foe-bar-off .target-btn.target-foe.target-mid {
	border-top: 1px solid #AAAAAA;
}
html.target-user-bar-off .target-btn.target-ally.target-left {
	border-left: 1px solid #AAAAAA;
}
html.target-user-bar-off .target-btn.target-ally.target-right {
	border-right: 1px solid #AAAAAA;
}
html.target-user-bar-off .target-btn.target-ally.target-mid {
	border-bottom: 1px solid #AAAAAA;
}
.target-btn .picon {
	flex: 0 0 auto;
	margin: -4px 0;
}
.target-btn .target-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: flex-end;
	gap: 5px;
}
.target-btn.target-right .target-info {
	flex-direction: row-reverse;
}
.target-btn .target-hp-col {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
}
.target-btn .target-name {
	display: block;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-align: center;
	font-weight: normal;
	line-height: 1.2;
}
.poke-gender,
.target-gender {
	font-family: -apple-system, BlinkMacSystemFont, sans-serif;
	font-weight: bold;
	text-shadow: -1px 0 #000000, 1px 0 #000000, 0 -1px #000000, 0 1px #000000;
}
.poke-gender-icon {
	display: inline-block;
	vertical-align: -1px;
	margin-left: 1px;
}
.gender-m {
	color: #55ccff;
}
.gender-f {
	color: #ff77aa;
}
.target-btn .target-hp {
	display: block;
	width: 100%;
	height: 4px;
	background: #CCCCCC;
	border: 1px solid #999999;
	border-radius: 3px;
	overflow: hidden;
	box-sizing: border-box;
}
.target-btn .target-hp span {
	display: block;
	height: 100%;
	background: #23B85A;
}
.target-btn .target-hp.hpbar-yellow span {
	background: #D1B828;
}
.target-btn .target-hp.hpbar-red span {
	background: #DD3333;
}
.target-hp-pct {
	flex: 0 0 auto;
	font-size: 10px;
	font-weight: normal;
	color: #555555;
	line-height: 1;
}
.target-btn .status {
	flex: 0 0 auto;
	font-size: 9px;
}
.target-btn.target-selected {
	opacity: 1;
	cursor: default;
	background: #f2f3f3 !important;
	color: #222222;
}
.target-btn.target-selected .target-name {
	font-weight: bold;
	font-size: 12px;
}
.target-btn.target-disabled {
	opacity: 0.45;
	cursor: default;
}
.mobile-pwa-tip,
#mobile-install-overlay {
	display: none;
}
#server-loading-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99990;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 12, 16, 0.76);
	backdrop-filter: blur(5px);
	box-sizing: border-box;
}
#server-loading-overlay.visible {
	display: flex;
}
.server-loading-box {
	width: min(320px, calc(100vw - 40px));
	padding: 24px 20px;
	background: #141b24;
	color: #eef2f6;
	border: 1px solid #3c4654;
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	font-family: Verdana, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
}
.server-loading-spinner {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid rgba(119, 158, 197, 0.25);
	border-top-color: #779EC5;
	animation: ps-spin 0.85s linear infinite;
}
@keyframes ps-spin {
	to {
		transform: rotate(360deg);
	}
}
#server-loading-text {
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
}
#server-loading-sub {
	font-size: 12.5px;
	line-height: 1.45;
	color: #b8c2ce;
}
#server-loading-retry {
	margin-top: 4px;
	min-width: 120px;
	min-height: 38px;
	padding: 6px 18px;
	font-size: 14px;
	font-weight: 700;
	border-radius: 8px;
	background: #2f74c0;
	color: #ffffff;
	border: 1px solid #4d93e0;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
}

@media (max-width: 640px) {
	html {
		height: 100dvh;
		min-height: 100vh;
		overflow: hidden;
		overscroll-behavior: none;
		background: #454445 url(../fx/client-bg-wildcard-phone.jpg?v=5) no-repeat center center / cover;
		background-attachment: scroll;
		-webkit-user-select: none;
		user-select: none;
		-webkit-touch-callout: none;
	}
	body {
		height: 100dvh;
		min-height: 100vh;
		overflow: hidden;
		overscroll-behavior: none;
		background: transparent;
		padding-top: 0;
		box-sizing: border-box;
		-webkit-user-select: none;
		user-select: none;
		-webkit-touch-callout: none;
	}
	.battle,
	.battle-controls,
	.header,
	button,
	.button,
	a.button,
	img {
		-webkit-user-select: none;
		user-select: none;
		-webkit-touch-callout: none;
	}
	input,
	textarea {
		-webkit-user-select: text;
		user-select: text;
		-webkit-touch-callout: default;
	}
	.header {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		z-index: 15;
		padding-top: env(safe-area-inset-top);
		height: 54px;
		box-sizing: content-box;
		background: #3d353a;
	}
	.dark .header {
		background: #2b2c31;
	}
	.ps-room {
		position: fixed;
		top: calc(60px + env(safe-area-inset-top));
		left: 0;
		right: 0;
		bottom: 0;
	}
	button,
	.button,
	a.button,
	label.megaevo {
		touch-action: manipulation;
	}
	.chatbox textarea,
	.battle-log-add textarea,
	.chat-log-add textarea,
	.ps-popup input,
	.ps-popup textarea,
	.ps-popup select,
	input.textbox {
		font-size: 16px;
	}
	.ps-popup {
		max-width: calc(100vw - 16px) !important;
		max-height: calc(100vh - 60px);
		overflow-y: auto;
		box-sizing: border-box;
	}
	.tabbar.maintabbar.minitabbar {
		height: 41px;
		margin-left: 0;
		margin-right: 138px;
	}
	.header:has(button[name=login]) .tabbar.maintabbar.minitabbar {
		margin-right: 150px;
	}
	.tabbar a.button.minilogo {
		width: calc(100vw - 160px);
		max-width: 252px;
		min-width: 165px;
		height: 40px;
		box-sizing: border-box;
		display: inline-flex;
		align-items: center;
		justify-content: space-between;
		padding: 4px 11px;
	}
	.header:has(button[name=login]) .tabbar a.button.minilogo {
		width: calc(100vw - 172px);
	}
	.tabbar a.button.minilogo .minilogo-room {
		flex: 1 1 auto;
		min-width: 0;
		text-align: center;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-size: 13.5px;
		font-weight: 600;
		color: #f0f0f0;
		padding: 0 8px;
		line-height: 30px;
	}
	.tabbar a.button.minilogo .minilogo-room i {
		display: inline-block;
		margin: 0 5px 0 0;
		height: auto;
		font-size: 14.5px;
		vertical-align: -1px;
	}
	.tabbar a.button.minilogo > img {
		flex: 0 0 auto;
		height: 26.5px;
		width: auto;
		display: block;
		margin: 1px 0 0 0;
	}
	.tabbar a.button.minilogo .minilogo-room img.minilogo-battle-icon {
		display: inline-block;
		height: 16px;
		width: 16px;
		margin: 0 5px 0 0;
		vertical-align: -3px;
	}
	.tabbar a.button.minilogo > i {
		flex: 0 0 auto;
		height: auto;
		margin: 0;
		font-size: 15.5px;
	}
	.tabbar.minitabbar a.button {
		min-width: 42px;
	}
	.tabbar.minitabbar ul:last-child a.button:not(.minilogo) {
		height: 40px;
		line-height: 1.25;
		max-width: calc(100vw - 262px);
		box-sizing: border-box;
		overflow: hidden;
	}
	.tabbar.minitabbar ul:last-child a.button:not(.minilogo):not(.closable) {
		padding: 3px 6px;
	}
	.tabbar.minitabbar ul:last-child a.button:not(.minilogo).closable {
		padding: 3px 18px 3px 5px;
	}
	.header:has(button[name=login]) .tabbar.minitabbar ul:last-child a.button:not(.minilogo) {
		max-width: calc(100vw - 300px);
	}
	.tabbar.minitabbar ul:last-child a.button.closable i.text,
	.tabbar.minitabbar ul:last-child a.button.closable span {
		display: block;
		max-width: 100%;
		margin-right: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		font-size: 10px;
		text-align: left;
		height: auto;
	}
	.maintabbarbottom {
		z-index: 5;
	}
	.userbar {
		right: 8px;
		top: auto;
		bottom: 0;
		z-index: 2;
		display: flex;
		align-items: flex-end;
		gap: 8px;
	}
	.dark .userbar .username {
		filter: none;
	}
	.dark .userbar .username,
	.dark .userbar button.icon,
	.dark .userbar button[name=login] {
		box-shadow: inset 0.5px 1px 1px rgba(255, 255, 255, 0.5);
	}
	.userbar .username {
		width: 36px;
		height: 40px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		margin: 0;
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		border-bottom: 0;
		box-sizing: border-box;
		text-shadow: none;
	}
	.userbar .username i {
		font-size: 18px;
		margin: 0;
	}
	.userbar button[name=login] {
		width: 48px;
		height: 40px;
		padding: 0;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		border-bottom: 0;
		box-sizing: border-box;
		margin: 0;
		text-shadow: none;
	}
	.userbar button[name=login] .login-desktop-text {
		display: none;
	}
	.userbar button[name=login] .login-mobile-icon {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 3px;
		color: #779EC5;
	}
	.userbar button[name=login] .login-mobile-icon .fa-user {
		font-size: 18px;
		margin: 0;
	}
	.userbar button[name=login] .login-mobile-icon .fa-plus {
		font-size: 11px;
		margin: 0;
	}
	.userbar button.icon {
		width: 36px;
		height: 40px;
		margin: 0;
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
		border-bottom: 0;
		box-sizing: border-box;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	.userbar button.icon i {
		font-size: 18px;
		margin: 0;
	}

	/* Main menu & activity feed */
	.tiny-layout .leftmenu {
		padding-top: 6px;
	}
	.tiny-layout .activitymenu {
		padding-bottom: 4px;
	}
	.tiny-layout .menugroup,
	.tiny-layout .rightmenu {
		width: min(340px, calc(100% - 20px));
		max-width: none;
		margin: 0 auto 12px auto;
		box-sizing: border-box;
	}
	.tiny-layout .menugroup .button,
	.tiny-layout .menugroup .button.big,
	.tiny-layout .rightmenu .menugroup .button {
		width: calc(100% - 24px);
		max-width: 280px;
		min-height: 44px;
	}
	.tiny-layout .menugroup .button.big,
	.tiny-layout .battleform .battlebot-btn,
	.tiny-layout .battleform .abilitylist-menu-btn {
		height: auto;
		min-height: 52px;
		padding: 6px 10px;
	}
	.tiny-layout .mainmenu .select {
		width: calc(100% - 24px);
		max-width: 280px;
		min-height: 42px;
		box-sizing: border-box;
	}
	.tiny-layout .battleform {
		width: calc(100% - 32px);
		max-width: 280px;
		margin: 0 auto;
	}
	.tiny-layout .battleform .select,
	.tiny-layout .battleform .button,
	.tiny-layout .battleform .button.big,
	.tiny-layout .battleform .battlebot-btn,
	.tiny-layout .battleform .abilitylist-menu-btn {
		width: 100% !important;
		max-width: none;
		box-sizing: border-box;
		margin-left: 0;
		margin-right: 0;
	}
	.tiny-layout .battleform .select.teamselect {
		height: 50px;
		min-height: 50px;
		white-space: nowrap;
		overflow: hidden;
	}
	.tiny-layout .battleform label.checkbox {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		font-size: 14px;
		line-height: 1.3;
		padding: 2px 0;
	}
	.tiny-layout .battleform label.checkbox input[type="checkbox"] {
		width: 18px;
		height: 18px;
		margin: 0;
		flex: 0 0 auto;
	}
	.tiny-layout .activitymenu .pm-window {
		width: min(340px, calc(100% - 20px));
		margin: 0 auto 8px auto;
	}

	/* Teambuilder */
	.teamlist .team {
		width: calc(100% - 92px);
		max-width: 350px;
		box-sizing: border-box;
	}
	.teampane {
		padding: 6px 8px;
		box-sizing: border-box;
	}

	/* Battle inline chat bar & standalone PWA safe-area clearance */
	.ps-room.inline-chat .battle-log-add {
		padding: 4px 10px max(4px, env(safe-area-inset-bottom)) 10px;
	}
	.ps-room.inline-chat .battle-log-add:focus-within,
	.chat-log-add:focus-within {
		padding-bottom: 4px;
	}
	.ps-room.inline-chat .battle-log-add .chatbox {
		display: flex;
		align-items: center;
		gap: 6px;
		margin: 0 4px;
		padding: 3px 0;
	}
	.ps-room.inline-chat .battle-log-add .chatbox label {
		float: none;
		margin: 0;
		padding: 0;
		width: auto;
		max-width: 45%;
		flex: 0 1 auto;
		text-align: left;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		font-size: 11px;
	}
	.ps-room.inline-chat .battle-log-add .chatbox textarea {
		flex: 1 1 auto;
		min-width: 0;
		width: auto;
		min-height: 30px;
		height: 30px;
		line-height: 22px;
		padding: 3px 8px;
		box-sizing: border-box;
	}
	.chatbox textarea::placeholder,
	.battle-log-add textarea::placeholder {
		color: #999999;
		font-style: italic;
		font-size: 13px;
		line-height: 22px;
		opacity: 1;
	}
	.chat-log-add {
		padding: 10px 14px calc(30px + env(safe-area-inset-bottom, 0px)) 14px;
		min-height: 74px;
		box-sizing: border-box;
	}
	.chat-log {
		bottom: calc(74px + env(safe-area-inset-bottom, 0px));
	}
	.chat-log-add form:not(.chatbox) {
		text-align: right;
		margin: 0;
	}
	.chat-log-add form:has(> button[name="login"]) {
		display: flex;
		justify-content: flex-end;
		align-items: center;
		margin: 0;
	}
	.chat-log-add button[name="login"] {
		padding: 8px 18px;
		font-size: 15px;
		font-weight: 600;
		min-height: 38px;
		border-radius: 8px;
	}
	.mobile-pwa-tip {
		display: block;
		margin-top: 8px;
		padding-top: 8px;
		border-top: 1px solid rgba(255, 255, 255, 0.15);
	}
	.mobile-pwa-tip p {
		margin: 4px 0;
	}
	.ps-popup.battleoptions-popup {
		text-align: right;
		font-size: 14.5px;
		padding: 10px 13px;
		width: auto !important;
		min-width: 245px;
		max-width: min(295px, calc(100vw - 24px)) !important;
	}
	.battleoptions-popup p {
		margin: 7px 0;
	}
	.battleoptions-popup .battleoptions-heading {
		font-size: 16px;
		margin: 16px 0 8px 0;
	}
	.battleoptions-popup .battleoptions-heading:first-child {
		margin-top: 2px;
	}
	.battleoptions-popup .battleoptions-timer {
		display: flex;
		justify-content: flex-end;
	}
	.battleoptions-popup .battleoptions-timer button {
		font-size: 14.5px;
		padding: 6px 13px;
		min-height: 36px;
	}
	.battleoptions-popup label.checkbox {
		display: flex;
		flex-direction: row-reverse;
		align-items: center;
		justify-content: flex-start;
		gap: 10px;
		width: 100%;
		font-size: 14.5px;
		line-height: 1.3;
		text-align: right;
		cursor: pointer;
	}
	.battleoptions-popup label.checkbox input[type="checkbox"] {
		flex: 0 0 auto;
		width: 21px;
		height: 21px;
		margin: 0;
	}
	.battleoptions-popup .battleoptions-done {
		margin-top: 16px;
		display: flex;
		justify-content: flex-end;
	}
	.battleoptions-popup .battleoptions-done button {
		min-width: 112px;
		min-height: 42px;
		padding: 7px 22px;
		font-size: 16px;
		font-weight: 600;
	}
	#mobile-install-overlay.visible {
		display: flex;
		position: fixed;
		inset: 0;
		z-index: 99999;
		align-items: center;
		justify-content: center;
		padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)) 12px;
		background: rgba(10, 12, 16, 0.86);
		backdrop-filter: blur(6px);
		box-sizing: border-box;
	}
	.mobile-install-modal {
		width: 100%;
		height: 100%;
		max-width: 440px;
		max-height: 100%;
		display: flex;
		flex-direction: column;
		background: #141b24;
		color: #e8edf2;
		border: 1px solid #3c4654;
		border-radius: 14px;
		box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
		overflow: hidden;
		box-sizing: border-box;
		font-family: Verdana, Helvetica, Arial, sans-serif;
	}
	.mobile-install-body {
		flex: 1 1 auto;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 20px 18px 16px 18px;
		display: flex;
		flex-direction: column;
		gap: 16px;
	}
	.mobile-install-header {
		text-align: center;
	}
	.mobile-install-icon {
		width: 56px;
		height: 56px;
		border-radius: 14px;
		display: block;
		margin: 0 auto;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
	}
	.mobile-install-header h2 {
		font-size: 20px;
		line-height: 1.25;
		margin: 10px 0 8px 0;
		color: #ffffff;
	}
	.mobile-install-header p {
		margin: 0;
		font-size: 13.5px;
		line-height: 1.5;
		color: #c4ced8;
	}
	#mobile-install-btn {
		width: 100%;
		min-height: 46px;
		padding: 10px 16px;
		font-size: 15.5px;
		font-weight: 700;
		border-radius: 10px;
		background: #2f74c0;
		color: #ffffff;
		border: 1px solid #4d93e0;
		box-shadow: 0 3px 10px rgba(47, 116, 192, 0.35);
		cursor: pointer;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		box-sizing: border-box;
	}
	#mobile-install-btn:active {
		background: #2561a3;
	}
	.mobile-install-guides {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}
	.mobile-install-card {
		background: rgba(255, 255, 255, 0.05);
		border: 1px solid rgba(255, 255, 255, 0.12);
		border-radius: 10px;
		padding: 14px 15px;
	}
	.mobile-install-card h3 {
		margin: 0 0 12px 0;
		font-size: 15px;
		color: #ffffff;
		display: flex;
		align-items: center;
		gap: 8px;
	}
	.mobile-install-steps {
		list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 11px;
	}
	.mobile-install-steps li {
		display: flex;
		align-items: flex-start;
		gap: 10px;
		font-size: 13.5px;
		line-height: 1.45;
		color: #d7dfe7;
	}
	.mobile-install-step-num {
		flex: 0 0 22px;
		height: 22px;
		border-radius: 50%;
		background: rgba(77, 147, 224, 0.22);
		border: 1px solid rgba(77, 147, 224, 0.55);
		color: #8ec5ff;
		font-size: 12px;
		font-weight: 700;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		margin-top: 1px;
	}
	.mobile-install-footer {
		flex: 0 0 auto;
		padding: 12px 18px 16px 18px;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		background: rgba(0, 0, 0, 0.22);
	}
	#mobile-install-continue {
		width: 100%;
		min-height: 46px;
		font-size: 16px;
		font-weight: 700;
		border-radius: 10px;
		background: #2b3544;
		color: #f0f4f8;
		border: 1px solid #4d5b6e;
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
		text-shadow: none;
		box-sizing: border-box;
	}
	#mobile-install-continue:hover,
	#mobile-install-continue:active {
		background: #364356;
	}
	.ps-popup.tablist.mobile-nav-popup,
	.dark .ps-popup.tablist.mobile-nav-popup {
		position: fixed !important;
		top: calc(56px + env(safe-area-inset-top, 0px)) !important;
		left: 8px !important;
		right: 8px !important;
		bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
		width: auto !important;
		max-width: 440px !important;
		max-height: none !important;
		margin: 0 auto !important;
	}
}
@media (max-width: 640px) and (max-aspect-ratio: 1/1) and (min-aspect-ratio: 2/3) {
	html {
		background-image: url(../fx/client-bg-wildcard-tablet.jpg?v=5);
	}
}
@media (max-width: 640px) and (min-aspect-ratio: 1/1) {
	html {
		background-image: url(../fx/client-bg-wildcard.jpg?v=5);
	}
}
.minilogo-battle-icon {
	height: 16px;
	width: 16px;
	vertical-align: -3px;
	margin-right: 5px;
	display: inline-block;
}
.ps-popup.tablist.mobile-nav-popup,
.dark .ps-popup.tablist.mobile-nav-popup {
	display: flex;
	flex-direction: column;
	width: 340px !important;
	max-width: calc(100vw - 16px) !important;
	max-height: 75vh;
	padding: 12px 12px 14px;
	background: #101720;
	color: #e8edf2;
	border: 2px solid #59626e;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
	overflow: hidden;
	box-sizing: border-box;
}
.tablist.mobile-nav-popup .tablist-lobby-preview {
	flex: 1 1 auto;
	min-height: 120px;
	display: flex;
	flex-direction: column;
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: rgba(18, 22, 28, 0.88);
	border: 1px solid rgba(255, 255, 255, 0.08);
}
.tablist.mobile-nav-popup .tablist-lobby-preview.cur {
	border-color: rgba(180, 200, 225, 0.55);
	box-shadow: inset 0 0 0 1px rgba(180, 200, 225, 0.25);
}
.tablist.mobile-nav-popup .tablist-lobby-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}
.tablist.mobile-nav-popup .tablist-lobby-users {
	background: rgba(120, 128, 138, 0.45);
	color: #8ab4f8;
	font-size: 11px;
	padding: 2px 10px;
	display: inline-block;
	border-bottom-right-radius: 4px;
}
.tablist.mobile-nav-popup .tablist-lobby-log {
	flex: 1 1 auto;
	overflow-y: hidden;
	padding: 6px 8px;
	font-size: 12.5px;
	line-height: 1.35;
	color: #e2e6ec;
	pointer-events: none;
}
.tablist.mobile-nav-popup .tablist-lobby-log a,
.tablist.mobile-nav-popup .tablist-lobby-log a.ilink {
	color: #8ec5ff;
	text-decoration: none;
}
.tablist.mobile-nav-popup .tablist-lobby-log .notice,
.tablist.mobile-nav-popup .tablist-lobby-log .chat {
	margin: 2px 0;
	color: #e2e6ec;
	word-wrap: break-word;
}
.tablist.mobile-nav-popup .tablist-lobby-log .chat small,
.tablist.mobile-nav-popup .tablist-lobby-log .message-pm,
.tablist.mobile-nav-popup .tablist-lobby-log small {
	color: #b8c2cf;
}
.tablist.mobile-nav-popup .tablist-lobby-log .tablist-lobby-empty {
	color: #9ba5b4;
	font-style: italic;
	padding: 6px 2px;
}
.tablist.mobile-nav-popup .tablist-divider {
	flex: 0 0 auto;
	width: 64%;
	height: 5px;
	margin: 12px auto;
	border-radius: 3px;
	background: #8c929a;
}
.tablist.mobile-nav-popup .tablist-battles-wrap {
	flex: 0 0 auto;
	max-height: 164px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding-right: 4px;
	scrollbar-width: thin;
	scrollbar-color: #d8dde3 rgba(255, 255, 255, 0.2);
}
.tablist.mobile-nav-popup .tablist-battles-wrap::-webkit-scrollbar {
	width: 4px;
}
.tablist.mobile-nav-popup .tablist-battles-wrap::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 2px;
}
.tablist.mobile-nav-popup .tablist-battles-wrap::-webkit-scrollbar-thumb {
	background: #d8dde3;
	border-radius: 2px;
}
.tablist.mobile-nav-popup ul.tablist-battles,
.tablist.mobile-nav-popup ul.tablist-bottom {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.tablist.mobile-nav-popup ul.tablist-battles li,
.tablist.mobile-nav-popup ul.tablist-bottom li {
	margin: 0;
	padding: 0;
	position: relative;
	list-style: none;
}
.tablist.mobile-nav-popup li a.button.tablist-pill,
.dark .tablist.mobile-nav-popup li a.button.tablist-pill {
	width: 100%;
	height: 46px;
	box-sizing: border-box;
	border-radius: 10px !important;
	padding: 0 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	background: #2c2f34;
	border: 2px solid #7f8791;
	color: #f2f4f7;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.2;
	box-shadow: none;
	text-shadow: none;
	text-decoration: none;
	overflow: hidden;
}
.tablist.mobile-nav-popup li a.button.tablist-pill:hover,
.tablist.mobile-nav-popup li a.button.tablist-pill:focus,
.dark .tablist.mobile-nav-popup li a.button.tablist-pill:hover,
.dark .tablist.mobile-nav-popup li a.button.tablist-pill:active {
	background: #3a3e45;
	border-color: #9ca4af;
	color: #ffffff;
}
.tablist.mobile-nav-popup li a.button.tablist-pill.cur,
.tablist.mobile-nav-popup li a.button.tablist-pill.cur:hover,
.dark .tablist.mobile-nav-popup li a.button.tablist-pill.cur,
.dark .tablist.mobile-nav-popup li a.button.tablist-pill.cur:hover,
.dark .tablist.mobile-nav-popup li a.button.tablist-pill.cur:active {
	background: #676c73 !important;
	border-color: #c2c7ce !important;
	color: #ffffff !important;
	font-weight: 700 !important;
}
.tablist.mobile-nav-popup .tablist-battle-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	height: 28px;
	display: block;
	pointer-events: none;
}
.tablist.mobile-nav-popup .tablist-pill-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	width: 28px;
	text-align: center;
	font-size: 22px;
	line-height: 1;
	color: #ffffff;
	pointer-events: none;
}
.tablist.mobile-nav-popup .tablist-pill-label {
	display: block;
	width: 100%;
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: inherit;
}
.tablist.mobile-nav-popup ul.tablist-battles li button.closebutton {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	float: none;
	margin: 0;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #b8c0ca;
	background: transparent;
	border: none;
	font-size: 16px;
	cursor: pointer;
	z-index: 11;
}
.tablist.mobile-nav-popup ul.tablist-battles li button.closebutton:hover {
	color: #ffffff;
}
.ps-popup.options-popup {
	width: 350px !important;
	max-width: calc(100vw - 16px) !important;
	max-height: calc(100vh - 68px);
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(180, 190, 205, 0.5) transparent;
	box-sizing: border-box;
	padding: 10px 12px 14px;
}
.ps-popup.options-popup::-webkit-scrollbar {
	width: 5px;
}
.ps-popup.options-popup::-webkit-scrollbar-track {
	background: transparent;
}
.ps-popup.options-popup::-webkit-scrollbar-thumb {
	background: rgba(180, 190, 205, 0.5);
	border-radius: 3px;
}
.options-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	margin: -2px 0 8px 0;
}
.options-title {
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.2px;
}
.options-gears {
	position: absolute;
	right: 0;
	top: -1px;
	width: 24px;
	height: 22px;
	pointer-events: none;
}
.options-gear-lg {
	position: absolute;
	left: 0;
	top: 0;
	font-size: 19px;
}
.options-gear-sm {
	position: absolute;
	right: 0;
	bottom: 0;
	font-size: 11px;
}
.options-profile {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 6px;
}
.options-profile-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
}
.options-user {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	flex: 1 1 auto;
}
.options-user .trainersprite {
	flex: 0 0 auto;
}
.options-user strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.options-top-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	flex: 0 0 auto;
}
.options-profile-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	width: 100%;
}
.options-profile-bottom .button {
	white-space: nowrap;
}
.options-action-row {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 6px;
}
.options-action-row .textbox {
	width: 115px;
	padding: 3px 6px;
	box-sizing: border-box;
}
.options-popup .optlabel {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
}
.options-popup .target-color-swatch {
	display: inline-block;
	width: 13px;
	height: 13px;
	border-radius: 3px;
	border: 1px solid #888888;
	box-sizing: border-box;
	flex: 0 0 auto;
}
.dark .options-popup .target-color-swatch {
	border-color: rgba(255, 255, 255, 0.55);
}
.mobile-menu-fab {
	display: none;
}
.ps-popup.bg-popup {
	width: 472px !important;
	max-width: calc(100vw - 16px) !important;
	max-height: calc(100vh - 80px);
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(180, 190, 205, 0.5) transparent;
	box-sizing: border-box;
	padding: 10px 14px 14px;
}
.ps-popup.bg-popup::-webkit-scrollbar {
	width: 5px;
}
.ps-popup.bg-popup::-webkit-scrollbar-track {
	background: transparent;
}
.ps-popup.bg-popup::-webkit-scrollbar-thumb {
	background: rgba(180, 190, 205, 0.5);
	border-radius: 3px;
}
.bg-popup .bglist {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	margin: 0;
}
.bg-popup .bglist button {
	float: none;
	width: 100%;
	margin: 0;
	padding: 3px;
	box-sizing: border-box;
}
.bg-popup .bglist button span.bg {
	width: 100%;
	height: 90px;
}
@media (max-width: 640px) {
	.ps-popup.options-popup,
	.dark .ps-popup.options-popup {
		position: fixed !important;
		top: calc(56px + env(safe-area-inset-top, 0px)) !important;
		right: 8px !important;
		left: auto !important;
		bottom: auto !important;
		max-height: calc(100dvh - 68px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
		margin: 0 !important;
	}
	.ps-popup.bg-popup,
	.dark .ps-popup.bg-popup {
		position: fixed !important;
		top: calc(56px + env(safe-area-inset-top, 0px)) !important;
		left: 8px !important;
		right: 8px !important;
		bottom: auto !important;
		width: auto !important;
		max-width: 472px !important;
		max-height: calc(100dvh - 72px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
		margin: 0 auto !important;
	}
	.bg-popup .bglist {
		grid-template-columns: repeat(2, 1fr);
	}
	.bglist .bg-desktop-only {
		display: none !important;
	}
	.mobile-menu-fab {
		position: fixed;
		right: 16px;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		width: 52px;
		height: 52px;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		background: rgba(24, 30, 39, 0.92);
		color: #ffffff;
		border: 2px solid #7f8791;
		box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
		font-size: 22px;
		z-index: 12;
		cursor: pointer;
		padding: 0;
	}
	.mobile-menu-fab:active {
		background: #3a424d;
		transform: scale(0.95);
	}
	#header > img.logo {
		height: 28px;
		width: auto;
		margin: 13px 12px;
	}
	#mainmenu:has(#loading-message) .activitymenu,
	#mainmenu:has(#loading-message) .mainmenufooter {
		display: none;
	}
	#mainmenu:has(#loading-message) .mainmenuwrapper {
		margin: 0 auto;
		padding: 18px 14px;
		width: 100%;
		max-width: 420px;
		box-sizing: border-box;
	}
	#mainmenu:has(#loading-message) .leftmenu,
	#mainmenu:has(#loading-message) .mainmenu {
		float: none;
		width: auto;
		max-width: 100%;
		margin: 0;
	}
	#mainmenu #loading-message {
		margin: 24px auto;
		padding: 14px 16px;
		border-radius: 10px;
		background: rgba(24, 28, 34, 0.86);
		color: #e2e8f0;
		border: 1px solid rgba(255, 255, 255, 0.14);
		font-size: 13.5px;
		line-height: 1.5;
		text-align: left;
	}
}
.bg-brightness-control {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 2px 0 10px 0;
	padding-bottom: 10px;
	border-bottom: 1px solid rgba(130, 140, 155, 0.35);
}
.bg-brightness-control label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
}
.bg-brightness-control input[type="range"] {
	width: 100%;
	margin: 0;
	accent-color: #4d93e0;
	cursor: pointer;
}
.login-service-status {
	margin-top: 10px;
	padding: 6px 10px;
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.08);
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.dark .login-service-status {
	background: rgba(255, 255, 255, 0.06);
}
.login-service-status .service-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex: 0 0 auto;
	background: #9aa3af;
}
.login-service-status.online .service-dot {
	background: #48c068;
	box-shadow: 0 0 6px rgba(72, 192, 104, 0.65);
}
.login-service-status.offline .service-dot {
	background: #e04848;
	box-shadow: 0 0 6px rgba(224, 72, 72, 0.65);
}
@media (display-mode: standalone) {
	.mobile-pwa-tip,
	#mobile-install-overlay {
		display: none !important;
	}
}

/* Wild-Card VGC Ability List Room */
.abilitylist-room {
	padding: 0;
}
.abilitylist-container {
	max-width: 860px;
	margin: 0 auto;
	padding: 16px 20px 32px;
}
.abilitylist-header {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 2px solid #c8d0dc;
}
.abilitylist-title-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}
.abilitylist-title-row h2 {
	margin: 0;
	font-size: 20px;
	line-height: 1.25;
}
.abilitylist-count {
	font-size: 12.5px;
	color: #556070;
	font-weight: 600;
	white-space: nowrap;
}
.abilitylist-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.abilitylist-search {
	flex: 1 1 240px;
	min-width: 180px;
	padding: 6px 10px;
	font-size: 13.5px;
	box-sizing: border-box;
}
.abilitylist-gen-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.abilitylist-gen-btn {
	padding: 5px 11px;
	font-size: 12.5px;
	font-weight: 600;
	border-radius: 5px;
}
.abilitylist-gen-btn.cur {
	background: #3d72b4;
	color: #fff;
	border-color: #2c558a;
}
.abilitylist-gen-header {
	margin: 18px 0 4px;
	padding: 7px 12px;
	background: rgba(61, 114, 180, 0.12);
	border-left: 4px solid #3d72b4;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.2px;
}
.abilitylist-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 6px;
	border-bottom: 1px solid #d4dae3;
}
.abilitylist-row:last-child {
	border-bottom: none;
}
.abilitylist-sprite-wrap {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.04);
}
.abilitylist-sprite {
	max-width: 58px;
	max-height: 58px;
	width: auto;
	height: auto;
	object-fit: contain;
}
.abilitylist-info {
	flex: 1 1 auto;
	min-width: 0;
}
.abilitylist-poke-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	margin-bottom: 4px;
}
.abilitylist-dexnum {
	font-size: 12px;
	font-weight: 700;
	color: #5b6676;
}
.abilitylist-pokename {
	font-size: 15px;
}
.abilitylist-types {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}
.abilitylist-abil + .abilitylist-abil {
	margin-top: 6px;
}
.abilitylist-abil-name {
	font-size: 13.5px;
	font-weight: 700;
	color: #21579a;
	margin-bottom: 2px;
}
.abilitylist-abil-desc {
	font-size: 13px;
	line-height: 1.45;
	color: #28303b;
}
.abilitylist-empty {
	padding: 28px 12px;
	text-align: center;
	font-size: 14px;
	color: #667080;
}

.dark .abilitylist-header {
	border-bottom-color: #3b424d;
}
.dark .abilitylist-count,
.dark .abilitylist-dexnum,
.dark .abilitylist-empty {
	color: #9aa6b8;
}
.dark .abilitylist-gen-btn.cur {
	background: #4d93e0;
	border-color: #7ab3f0;
	color: #fff;
}
.dark .abilitylist-gen-header {
	background: rgba(77, 147, 224, 0.16);
	border-left-color: #5aa3f0;
	color: #e6eef8;
}
.dark .abilitylist-row {
	border-bottom-color: #343b46;
}
.dark .abilitylist-sprite-wrap {
	background: rgba(255, 255, 255, 0.05);
}
.dark .abilitylist-abil-name {
	color: #7cb9ff;
}
.dark .abilitylist-abil-desc {
	color: #d6dde8;
}

@media (max-width: 640px) {
	.abilitylist-container {
		padding: 12px 12px 24px;
	}
	.abilitylist-title-row h2 {
		font-size: 17px;
	}
	.abilitylist-row {
		align-items: flex-start;
		gap: 11px;
		padding: 11px 2px;
	}
	.abilitylist-sprite-wrap {
		flex: 0 0 54px;
		width: 54px;
		height: 54px;
	}
	.abilitylist-sprite {
		max-width: 50px;
		max-height: 50px;
	}
	.abilitylist-abil-desc {
		font-size: 12.5px;
	}
}

.news-abilitylist-link {
	background: none;
	border: none;
	padding: 0;
	margin: 0;
	font: inherit;
	display: inline;
	color: #1d6fe2;
	text-decoration: underline;
	cursor: pointer;
	font-weight: 600;
}
.dark .news-abilitylist-link {
	color: #5ca9ff;
}

.mobile-slot-num {
	display: none;
}

/* Mobile-only Teambuilder & Ability List FAB layout improvements */
@media (max-width: 639px) {
	html, body {
		overflow: hidden;
		overscroll-behavior: none;
	}
	.abilitylist-container {
		padding-bottom: 84px;
	}
	#room-teambuilder {
		overflow-x: hidden !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch;
		touch-action: pan-y;
		overscroll-behavior: none;
		overscroll-behavior-y: none;
	}

	/* Shared compact & organized Pokemon card styling on mobile */
	.teamwrapper.mobile-teamview .setmenu,
	.teamwrapper.mobile-setview .setmenu {
		position: static;
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: 4px 8px;
		margin: 0 0 4px;
		text-align: right;
	}
	.teamwrapper.mobile-teamview .setchart-nickname,
	.teamwrapper.mobile-setview .setchart-nickname {
		position: static;
		width: 100%;
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 6px 8px 4px;
		margin: 0;
		background: #DAE5F0;
		border: 1px solid #999999;
		border-bottom: 0;
		border-radius: 5px 5px 0 0;
		box-shadow: inset 1px 1px 0 rgba(255,255,255,.6);
		box-sizing: border-box;
	}
	.dark .teamwrapper.mobile-teamview .setchart-nickname,
	.dark .teamwrapper.mobile-setview .setchart-nickname {
		background-color: #5A6570;
		border-color: #3b424d;
		box-shadow: none;
	}
	.teamwrapper.mobile-teamview .mobile-slot-num,
	.teamwrapper.mobile-setview .mobile-slot-num {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
		min-width: 26px;
		height: 22px;
		padding: 0 6px;
		border-radius: 4px;
		background: rgba(0, 0, 0, 0.14);
		font-size: 12px;
		font-weight: 700;
		color: #222;
	}
	.dark .teamwrapper.mobile-teamview .mobile-slot-num,
	.dark .teamwrapper.mobile-setview .mobile-slot-num {
		background: rgba(255, 255, 255, 0.14);
		color: #f0f4fa;
	}
	.teamwrapper.mobile-teamview .setchart-nickname label,
	.teamwrapper.mobile-setview .setchart-nickname label {
		margin: 0;
		flex: 0 0 auto;
		font-size: 11px;
	}
	.teamwrapper.mobile-teamview .setchart-nickname input,
	.teamwrapper.mobile-setview .setchart-nickname input {
		flex: 1 1 auto;
		min-width: 0;
		width: 100%;
		margin: 0;
		padding: 4px 6px;
		font-size: 13px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview .setchart,
	.teamwrapper.mobile-setview .setchart {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		min-height: 110px;
		margin-top: 0;
		padding: 8px;
		box-sizing: border-box;
		display: flex !important;
		flex-wrap: wrap !important;
		align-items: stretch;
		gap: 8px;
		overflow: hidden;
		text-align: left;
		border-radius: 0 0 5px 5px;
		border-top: 1px solid rgba(0, 0, 0, 0.12);
		background-position: 6px 2px !important;
	}
	.dark .teamwrapper.mobile-teamview .setchart,
	.dark .teamwrapper.mobile-setview .setchart {
		border-top-color: rgba(255, 255, 255, 0.12);
	}
	.teamwrapper.mobile-teamview .teamchart > li > .setchart:not(.setchart-nickname + .setchart),
	.teamwrapper.mobile-setview .teamchart > li > .setchart:not(.setchart-nickname + .setchart) {
		border-radius: 5px;
		border-top: 1px solid #999999;
	}
	.teamwrapper.mobile-teamview .setcol,
	.teamwrapper.mobile-setview .setcol {
		float: none;
		height: auto;
	}
	.teamwrapper.mobile-teamview .setcol-icon,
	.teamwrapper.mobile-setview .setcol-icon {
		flex: 0 0 106px;
		width: 106px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	.teamwrapper.mobile-teamview .setcell-sprite.typebg,
	.teamwrapper.mobile-setview .setcell-sprite.typebg {
		width: 100%;
		height: 78px;
		margin: 0 0 2px 0;
		border-radius: 10px;
	}
	.teamwrapper.mobile-teamview .setcol-icon input,
	.teamwrapper.mobile-setview .setcol-icon input {
		width: 100% !important;
		margin: 2px 0 0;
		padding: 4px 6px;
		font-size: 13px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview .setcol-details,
	.teamwrapper.mobile-setview .setcol-details {
		flex: 1 1 calc(100% - 116px);
		min-width: 0;
		width: auto;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 4px;
	}
	.teamwrapper.mobile-teamview .setcell-details,
	.teamwrapper.mobile-setview .setcell-details {
		height: auto;
	}
	.teamwrapper.mobile-teamview .setdetails,
	.teamwrapper.mobile-setview .setdetails {
		width: 100% !important;
		height: auto !important;
		min-height: 34px;
		display: flex;
		flex-wrap: wrap;
		margin: 0;
		padding: 2px 4px;
	}
	.teamwrapper.mobile-teamview .setdetails .detailcell,
	.teamwrapper.mobile-setview .setdetails .detailcell {
		float: none;
		flex: 1 1 auto;
		font-size: 11px;
		padding: 1px 3px;
	}
	.teamwrapper.mobile-teamview .setrow-icons,
	.teamwrapper.mobile-setview .setrow-icons {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: auto;
		min-height: 24px;
	}
	.teamwrapper.mobile-teamview .setcell-typeicons,
	.teamwrapper.mobile-setview .setcell-typeicons {
		float: none;
		margin: 0;
		display: flex;
		align-items: center;
		gap: 2px;
	}
	.teamwrapper.mobile-teamview .setcol-details > .setrow:last-child,
	.teamwrapper.mobile-setview .setcol-details > .setrow:last-child {
		display: flex;
		gap: 6px;
		width: 100%;
	}
	.teamwrapper.mobile-teamview .setcell-item,
	.teamwrapper.mobile-setview .setcell-item {
		flex: 1 1 46%;
		min-width: 0;
		float: none;
	}
	.teamwrapper.mobile-teamview .setcell-ability,
	.teamwrapper.mobile-setview .setcell-ability {
		flex: 1 1 54%;
		min-width: 0;
		float: none;
	}
	.teamwrapper.mobile-teamview .setcell-item input,
	.teamwrapper.mobile-teamview .setcell-ability input,
	.teamwrapper.mobile-setview .setcell-item input,
	.teamwrapper.mobile-setview .setcell-ability input {
		width: 100% !important;
		margin: 0;
		padding: 4px 6px;
		font-size: 12.5px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview .setcol-moves,
	.teamwrapper.mobile-setview .setcol-moves {
		flex: 1 1 0;
		min-width: 0;
		width: auto;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 3px;
	}
	.teamwrapper.mobile-teamview .setcol-moves .setcell,
	.teamwrapper.mobile-setview .setcol-moves .setcell {
		float: none;
		padding-bottom: 0;
	}
	.teamwrapper.mobile-teamview .setcol-moves input,
	.teamwrapper.mobile-setview .setcol-moves input {
		width: 100% !important;
		margin: 0;
		padding: 3px 6px;
		height: 22px;
		font-size: 12px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview .setcol-stats,
	.teamwrapper.mobile-setview .setcol-stats {
		flex: 0 0 auto;
		min-width: 126px;
		width: auto;
		display: flex;
		flex-direction: column;
	}
	.teamwrapper.mobile-teamview .setcol-stats > .setrow,
	.teamwrapper.mobile-setview .setcol-stats > .setrow {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
	}
	.teamwrapper.mobile-teamview .setstats,
	.teamwrapper.mobile-setview .setstats {
		flex: 1 1 auto;
		width: auto !important;
		height: auto !important;
		margin: 0;
		padding: 3px 6px;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
	.teamwrapper.mobile-teamview .setstats .statrow-head,
	.teamwrapper.mobile-setview .setstats .statrow-head {
		display: none !important;
	}
	.teamwrapper.mobile-teamview .setstats .statrow,
	.teamwrapper.mobile-setview .setstats .statrow {
		display: flex;
		align-items: center;
		gap: 4px;
		height: 15px;
	}
	.teamwrapper.mobile-teamview .setstats .statgraph,
	.teamwrapper.mobile-setview .setstats .statgraph {
		float: none;
		flex: 0 0 60px;
		width: 60px;
		height: 8px;
		overflow: hidden;
		padding: 0;
		display: flex;
		align-items: center;
	}
	.teamwrapper.mobile-teamview .setstats .statgraph span,
	.teamwrapper.mobile-setview .setstats .statgraph span {
		height: 7px !important;
		margin-top: 0 !important;
		border-radius: 2px;
	}
	.teamwrapper.mobile-teamview .setstats em,
	.teamwrapper.mobile-setview .setstats em {
		float: none;
		width: auto;
		min-width: 16px;
		text-align: right;
	}
	.teamwrapper.mobile-setview .chartinput.mobile-active-chart {
		border-color: #4d93e0 !important;
		box-shadow: 0 0 0 1px rgba(77, 147, 224, 0.55);
	}
	.teamwrapper.mobile-setview .chartinput.mobile-active-chart::placeholder {
		color: #a6b0bd;
		font-style: italic;
		opacity: 1;
	}
	.teamwrapper.mobile-setview .statform {
		width: 100%;
		padding: 4px 8px max(64px, 10vh);
		box-sizing: border-box;
		overflow: visible;
	}
	.teamwrapper.mobile-setview .statform p.suggested {
		margin: 2px 0 16px;
	}
	.teamwrapper.mobile-setview .statform p.suggested small {
		display: block;
		margin-bottom: 6px;
	}
	.teamwrapper.mobile-setview .statform-nature {
		margin: 0 0 14px;
		display: flex;
		align-items: center;
		gap: 8px;
		font-size: 13px;
		font-weight: 600;
	}
	.teamwrapper.mobile-setview .statform-nature select[name="nature"] {
		flex: 1 1 auto;
		min-width: 0;
		font-size: 12.5px;
		padding: 4px 6px;
	}
	.msv-statform-list {
		display: flex;
		flex-direction: column;
		gap: 10px;
		width: 100%;
	}
	.msv-sf-header {
		display: flex;
		align-items: center;
		gap: 8px;
		width: 100%;
		font-size: 11px;
		font-weight: 700;
		color: #b8c4d4;
		margin-bottom: -4px;
	}
	.msv-sf-h-ev,
	.msv-sf-h-iv {
		flex: 0 0 42px;
		text-align: center;
	}
	.msv-sf-h-slider {
		flex: 1 1 auto;
	}
	.msv-sf-h-total {
		flex: 0 0 34px;
		text-align: right;
	}
	.msv-sf-row {
		display: flex;
		flex-direction: column;
		gap: 3px;
		width: 100%;
	}
	.msv-sf-title-row {
		display: flex;
		align-items: baseline;
		gap: 5px;
		font-size: 12px;
		font-weight: 700;
		color: #eef3f9;
		line-height: 1.15;
	}
	.msv-sf-nat:empty {
		display: none;
	}
	.msv-sf-plus {
		color: #7ee787;
		font-weight: 800;
	}
	.msv-sf-minus {
		color: #ff7b72;
		font-weight: 800;
	}
	.msv-sf-base {
		font-size: 10.5px;
		font-weight: 500;
		color: #9aa7b8;
	}
	.msv-sf-controls {
		display: flex;
		align-items: center;
		gap: 8px;
		width: 100%;
	}
	#room-teambuilder .msv-sf-controls input.msv-sf-ev-input,
	#room-teambuilder .msv-sf-controls input.msv-sf-iv-input {
		flex: 0 0 42px;
		width: 42px !important;
		height: 24px !important;
		margin: 0 !important;
		padding: 1px 2px !important;
		font-size: 12px !important;
		text-align: center;
		box-sizing: border-box;
	}
	.msv-sf-controls .msv-sf-slider {
		flex: 1 1 auto;
		min-width: 0;
		width: 100%;
		margin: 0;
	}
	.msv-sf-total {
		flex: 0 0 34px;
		text-align: right;
		font-size: 13px;
		color: #f0f4f8;
	}
	.msv-sf-footer {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		margin-top: 2px;
		padding-top: 8px;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
	}
	.msv-sf-remaining {
		font-size: 12px;
		color: #b8c4d4;
	}
	.msv-sf-remaining .totalev em {
		font-style: normal;
		font-weight: 700;
		color: #eef3f9;
	}
	.msv-sf-remaining .totalev b {
		color: #ff6b6b;
	}
	.msv-sf-ivspread select[name="ivspread"] {
		font-size: 12px;
		padding: 4px 8px;
	}

	/* Team overview screen: centered and enlarged controls */
	.teamwrapper.mobile-teamview {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		min-height: 100%;
		overflow: visible !important;
		transform: none !important;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview > .pad {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		padding: 10px 12px;
	}
	.teamwrapper.mobile-teamview > .pad .teamnameedit {
		flex: 1 1 120px;
		min-width: 0;
		width: auto;
		min-height: 36px;
		font-size: 14px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview > .pad .button {
		min-height: 36px;
		padding: 6px 12px;
		font-size: 13.5px;
	}
	.teamwrapper.mobile-teamview .teamchartbox {
		position: static;
		top: auto;
		width: 100%;
		overflow: visible !important;
		padding: 8px 10px 28px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview .teamchart {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 0;
		width: 100%;
	}
	.teamwrapper.mobile-teamview .teamchart > li {
		width: 100%;
		max-width: 400px;
		padding-top: 10px;
		text-align: center;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview .teamchart > li.format-select {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 8px;
		padding: 8px 0 6px;
	}
	.teamwrapper.mobile-teamview .teamchart > li.format-select label {
		width: 100%;
		font-size: 13px;
		margin-bottom: 2px;
		text-align: center;
	}
	.teamwrapper.mobile-teamview .teamchart > li.format-select .teambuilderformatselect {
		flex: 1 1 180px;
		min-height: 44px;
		font-size: 14.5px;
		padding: 6px 10px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview .teamchart > li.format-select button[name="validate"] {
		min-height: 44px;
		padding: 8px 14px;
		font-size: 14px;
	}
	.teamwrapper.mobile-teamview .teamchart button[name="import"],
	.teamwrapper.mobile-teamview .teamchart button[name="addPokemon"],
	.teamwrapper.mobile-teamview .teamchart button[name="undeleteSet"] {
		width: 100%;
		max-width: 340px;
		min-height: 50px;
		font-size: 16px;
		padding: 10px 14px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-teamview #pokepasteForm {
		display: flex !important;
		flex-direction: column;
		align-items: center;
		width: 100%;
		margin-top: 10px;
	}
	.teamwrapper.mobile-teamview #pokepasteForm p {
		width: 100%;
		max-width: 340px;
		margin: 6px 0;
		text-align: center;
	}
	.teamwrapper.mobile-teamview .exportbutton {
		width: 100%;
		margin-left: 0;
		min-height: 42px;
		padding: 8px 12px;
		font-size: 13px;
		white-space: normal;
		box-sizing: border-box;
	}

	/* Set editor & Pokemon/Item/Move picker: full native 1.0x width (contain: none fixes collapsed rows) */
	.dark #room-teambuilder:has(.mobile-setview) {
		background: #0E1215;
	}
	.teamwrapper.mobile-setview {
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		min-height: 100% !important;
		overflow: hidden !important;
		padding-bottom: 16px;
		transform: none !important;
		box-sizing: border-box;
	}
	.dark .teamwrapper.mobile-setview {
		background: #0E1215;
	}
	.teamwrapper.mobile-setview > .pad {
		min-height: 44px;
		padding: 6px 8px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-setview .teambar {
		position: static;
		left: auto;
		top: auto;
		min-width: 0;
		width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		white-space: nowrap;
		display: flex;
		padding: 0 6px;
		box-sizing: border-box;
		margin-bottom: 4px;
	}
	.teamwrapper.mobile-setview .teambar button {
		position: relative;
		float: none;
		flex: 1 1 0;
		min-width: 0;
		margin: 0 2px 0 0;
		padding: 4px 2px;
		box-sizing: border-box;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.teamwrapper.mobile-setview .teambar button:last-child {
		margin-right: 0;
	}
	.teamwrapper.mobile-setview .teambar .teambar-num {
		display: block;
		position: absolute;
		top: 2px;
		left: 3px;
		font-size: 8px;
		font-weight: 700;
		line-height: 1;
		color: rgba(28, 34, 43, 0.72);
		pointer-events: none;
	}
	.dark .teamwrapper.mobile-setview .teambar .teambar-num {
		color: rgba(255, 255, 255, 0.8);
	}
	.teamwrapper.mobile-setview .teamchartbox.individual {
		position: static;
		width: 100%;
		max-width: 100% !important;
		overflow: visible !important;
		padding: 2px 6px 6px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-setview .teamchart {
		width: 100%;
		padding: 0;
	}
	.teamwrapper.mobile-setview .teamchart > li {
		padding-top: 4px;
	}
	.teamwrapper.mobile-setview .teambuilder-results {
		position: static !important;
		min-width: 0 !important;
		max-width: 100% !important;
		width: 100% !important;
		height: auto !important;
		min-height: 0 !important;
		overflow: hidden !important;
		padding-bottom: 8px;
		touch-action: pan-y;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart {
		width: 100% !important;
		height: auto !important;
		min-height: 0 !important;
		overflow: hidden !important;
		margin-bottom: 0;
		padding-bottom: 0;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart li.result,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart li.resultheader {
		contain: none !important;
		width: 100% !important;
		height: auto !important;
		overflow: visible !important;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart li.resultheader h3 {
		width: 100%;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .sortrow {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		gap: 6px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		width: calc(100% - 10px);
		height: auto;
		min-height: 36px;
		margin: 4px 5px 6px;
		padding: 5px 8px;
		background: #DAE5F0;
		border: 1.5px solid #8b9bb0;
		border-radius: 8px;
		color: #1c222b;
		font-size: 12.5px;
		box-sizing: border-box;
	}
	.dark .teamwrapper.mobile-setview .teambuilder-results .utilichart .sortrow {
		background: #535c66;
		border-color: #aeb6c2;
		color: #f0f4f8;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .sortrow .sortlabel {
		display: inline-flex;
		align-items: center;
		flex: 0 0 auto;
		font-size: 12.5px;
		font-weight: 700;
		margin-right: 2px;
		color: inherit;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .sortrow .desktop-sort-lbl {
		display: none;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .sortrow .mobile-num-lbl {
		display: inline;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .sortrow .sortcol {
		float: none;
		flex: 0 0 auto;
		width: auto !important;
		height: 28px;
		padding: 0 10px;
		border-radius: 6px;
		font-size: 12.5px;
		font-weight: 600;
		text-align: center;
		background: rgba(0, 0, 0, 0.08);
		color: #1c222b;
	}
	.dark .teamwrapper.mobile-setview .teambuilder-results .utilichart .sortrow .sortcol {
		background: rgba(0, 0, 0, 0.28);
		color: #f0f4f8;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .sortrow .sortcol.cur,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .sortrow .sortcol.numsortcol.cur {
		background: #222527;
		color: #ffffff;
		border: 1px solid #6bacc5;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart li.result a {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 4px 6px;
		width: calc(100% - 10px) !important;
		max-width: calc(100% - 10px) !important;
		margin: 0 5px 3px 5px !important;
		height: auto !important;
		min-height: 44px;
		padding: 7px 8px;
		overflow: hidden !important;
		box-sizing: border-box !important;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .col {
		float: none;
		height: auto;
		padding-top: 0;
		font-size: 13.5px;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .numcol {
		display: none;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .iconcol {
		flex: 0 0 40px;
		width: 40px;
		height: 30px;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .pokemonnamecol,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .namecol,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .abilitynamecol {
		flex: 1 1 110px;
		width: auto;
		min-width: 90px;
		font-size: 15px;
		font-weight: 700;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .movenamecol {
		flex: 1 1 84px;
		width: auto;
		min-width: 72px;
		font-size: 14px;
		font-weight: 700;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .labelcol,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .widelabelcol,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .pplabelcol {
		flex: 0 0 auto;
		width: auto !important;
		min-width: 24px;
		margin-left: 0 !important;
		font-size: 11px;
		text-align: center;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .typecol {
		flex: 0 0 auto;
		width: auto;
		min-width: 82px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 3px;
		white-space: nowrap;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .typecol img {
		width: 38px;
		height: 17px;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .typecol img.hd-type-icon {
		width: 38px;
		height: 16px;
		object-fit: contain;
	}
	.mtc-types .hd-type-icon {
		width: 32px;
		height: 14px;
		object-fit: contain;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .abilitycol,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .abilitycol.wideabilitycol,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .twoabilitycol {
		flex: 1 1 100%;
		width: auto;
		padding-left: 8px;
		text-align: left;
		font-size: 13px;
		line-height: 1.3;
		white-space: normal;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .mobile-abil-prefix {
		display: inline;
		font-weight: 400;
		color: #b8c4d4;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .mobile-abil-name {
		font-weight: 700;
		color: #f0f4f8;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .itemdesccol,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .movedesccol,
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .abilitydesccol {
		flex: 1 1 100%;
		width: auto !important;
		height: auto !important;
		white-space: normal !important;
		padding-left: 0;
		text-align: left;
		font-size: 12.5px;
		line-height: 1.3;
		opacity: 0.9;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .statcols-group {
		float: none !important;
		display: flex;
		flex: 1 1 100%;
		width: 100%;
		min-height: 0 !important;
		background: rgba(255, 255, 255, 0.09);
		border: 1px solid rgba(255, 255, 255, 0.22);
		border-radius: 6px;
		padding: 3px 2px;
		margin-top: 2px;
		box-sizing: border-box;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .statcol {
		flex: 1 1 0;
		min-width: 0;
		width: auto;
		text-align: center;
		font-size: 12px;
		padding-top: 0;
		border-top: 0;
		color: #eef3f9;
	}
	.teamwrapper.mobile-setview .teambuilder-results .utilichart .bstcol {
		display: none;
	}

	/* Visible right scrollbar + 2-column compact 6-Pokemon Team Grid on mobile */
	#room-teambuilder {
		overflow-y: scroll !important;
		scrollbar-width: thin;
		scrollbar-color: rgba(255, 255, 255, 0.45) rgba(0, 0, 0, 0.16);
	}
	#room-teambuilder::-webkit-scrollbar {
		width: 6px;
	}
	#room-teambuilder::-webkit-scrollbar-track {
		background: rgba(0, 0, 0, 0.16);
		border-radius: 3px;
	}
	#room-teambuilder::-webkit-scrollbar-thumb {
		background: rgba(255, 255, 255, 0.45);
		border-radius: 3px;
	}
	.teamwrapper.mobile-teamview .teamchart > li.mobile-team-grid-item {
		max-width: 100% !important;
		width: 100%;
		padding-top: 8px !important;
	}
	.mobile-team-grid {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		width: 100%;
		box-sizing: border-box;
	}
	.mobile-team-card {
		background: #DAE5F0;
		border: 1px solid #8b9bb0;
		border-radius: 10px;
		padding: 7px;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		gap: 5px;
		text-align: left;
		color: #1c222b;
		min-width: 0;
		box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.45);
	}
	.dark .mobile-team-card {
		background: #535c66;
		border-color: #3a414a;
		color: #f0f4f8;
		box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.08);
	}
	.mtc-header {
		display: flex;
		align-items: center;
		gap: 6px;
	}
	.mtc-slot-num {
		flex: 0 0 auto;
		min-width: 24px;
		height: 22px;
		padding: 0 5px;
		border-radius: 4px;
		background: rgba(0, 0, 0, 0.16);
		color: #1f252e;
		font-size: 11.5px;
		font-weight: 700;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	.dark .mtc-slot-num {
		background: rgba(255, 255, 255, 0.2);
		color: #ffffff;
	}
	.mtc-nickname {
		flex: 1 1 auto;
		min-width: 0;
		background: #23272e;
		color: #f3f6fa;
		border-radius: 8px;
		padding: 3px 7px;
		font-size: 11px;
		font-weight: 700;
		text-align: center;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		cursor: pointer;
	}
	.mtc-top {
		display: flex;
		align-items: flex-start;
		gap: 5px;
	}
	.mtc-left-meta {
		flex: 0 0 38px;
		width: 38px;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 4px;
	}
	.mtc-types {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
		min-height: 30px;
	}
	.mtc-item-box {
		width: 34px;
		height: 34px;
		border-radius: 7px;
		background: rgba(255, 255, 255, 0.65);
		border: 1px solid rgba(0, 0, 0, 0.18);
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
	}
	.dark .mtc-item-box {
		background: rgba(235, 240, 248, 0.72);
		border-color: rgba(255, 255, 255, 0.25);
	}
	.mtc-item-box .itemicon {
		display: block;
		width: 24px;
		height: 24px;
	}
	.mtc-item-empty {
		width: 14px;
		height: 14px;
		border-radius: 50%;
		border: 1.5px dashed rgba(60, 70, 85, 0.45);
	}
	.mtc-ability-wrap {
		display: flex;
		flex-direction: column;
		gap: 2px;
		width: 100%;
		margin-top: 2px;
		cursor: pointer;
	}
	.mtc-ability-pill {
		width: 100%;
		font-size: 10px;
		padding: 2.5px 7px;
	}
	.mtc-label {
		font-size: 9px;
		font-weight: 700;
		line-height: 1.1;
		color: #2f3845;
	}
	.dark .mtc-label {
		color: #e2e8f0;
	}
	.mtc-pill {
		background: #22262d;
		color: #eef3f9;
		border-radius: 8px;
		padding: 2.5px 6px;
		font-size: 9.5px;
		font-weight: 600;
		line-height: 1.3;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		cursor: pointer;
		box-sizing: border-box;
	}
	.mtc-empty {
		color: #8c95a3;
		font-weight: 500;
	}
	.mtc-model-wrap {
		position: relative;
		flex: 1 1 auto;
		min-width: 0;
		height: 76px;
		margin-top: -4px;
		margin-left: -4px;
		display: flex;
		align-items: center;
		justify-content: center;
		cursor: pointer;
	}
	.mtc-model-wrap.typebg {
		border-radius: 10px;
		overflow: hidden;
		padding: 3px;
		box-sizing: border-box;
		margin-top: 0;
		margin-left: 0;
		border: 1px solid rgba(0, 0, 0, 0.28);
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.2);
	}
	.mtc-model {
		position: relative;
		z-index: 1;
		max-width: 100%;
		max-height: 76px;
		width: auto;
		height: auto;
		object-fit: contain;
	}
	.mtc-model-wrap.typebg .mtc-model {
		max-height: 100%;
		filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.78)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
	}
	.mtc-bottom {
		display: flex;
		align-items: stretch;
		gap: 6px;
	}
	.mtc-moves-col {
		flex: 1 1 50%;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 3px;
	}
	.mtc-move-pill {
		font-size: 8.5px;
		padding: 0 5px 2px;
		height: 16px;
		line-height: 12px;
	}
	.mtc-stats-col {
		flex: 1 1 50%;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 2px;
		cursor: pointer;
	}
	.mtc-stats-box {
		flex: 1 1 auto;
		background: #22262d;
		border-radius: 8px;
		padding: 4px 5px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 2px;
		min-height: 70px;
		box-sizing: border-box;
	}
	.mtc-stat-row {
		display: flex;
		align-items: center;
		gap: 3px;
		font-size: 8.5px;
		line-height: 1;
		color: #c9d2de;
	}
	.mtc-stat-lbl {
		flex: 0 0 25px;
		text-align: right;
		font-weight: 600;
		white-space: nowrap;
	}
	.mtc-stat-bar-bg {
		flex: 1 1 auto;
		min-width: 0;
		height: 5px;
		background: rgba(255, 255, 255, 0.08);
		border-radius: 2px;
		overflow: hidden;
	}
	.mtc-stat-bar-fill {
		display: block;
		height: 100%;
		border-radius: 2px;
	}
	.mtc-stat-ev {
		flex: 0 0 auto;
		min-width: 14px;
		text-align: right;
		font-size: 8px;
		color: #9fb0c7;
	}
}

/*********************************************************
 * Teambuilder Recessed Textboxes & Card Validation Outlines
 *********************************************************/

#room-teambuilder .textbox,
#room-teambuilder input[type="text"],
#room-teambuilder textarea,
#room-teambuilder .setdetails,
#room-teambuilder .setstats,
#room-teambuilder .statform input.inputform,
#room-teambuilder .teamnameedit,
#room-teambuilder .teamedit textarea,
#room-teambuilder .pokemonedit,
#room-teambuilder .searchbox,
.mtc-nickname,
.mtc-pill,
.mtc-stats-box {
	background: #222527;
	color: #DDD;
	border: 1px solid #6b7178;
	box-shadow: inset 0.5px 1px 2px rgba(0, 0, 0, 1), inset -0.5px -1px 1px rgba(255, 255, 255, 0.2), -0.5px -1px 1px rgba(255, 255, 255, 0.1);
}
#room-teambuilder .textbox:hover,
#room-teambuilder input[type="text"]:hover,
#room-teambuilder textarea:hover,
#room-teambuilder .setdetails:hover,
#room-teambuilder .setstats:hover,
#room-teambuilder .statform input.inputform:hover {
	background: #262a2d;
	border-color: #7c838b;
	color: #EEE;
	box-shadow: inset 0.5px 1px 2px rgba(0, 0, 0, 1), inset -0.5px -1px 1px rgba(255, 255, 255, 0.22), -0.5px -1px 1px rgba(255, 255, 255, 0.12);
}
#room-teambuilder .textbox:focus,
#room-teambuilder input[type="text"]:focus,
#room-teambuilder textarea:focus,
#room-teambuilder .setdetails:focus,
#room-teambuilder .setstats:focus,
#room-teambuilder .statform input.inputform:focus {
	background: #262a2e;
	color: #FFF;
	border-color: #6bacc5;
	box-shadow: inset 0.5px 1px 2px rgba(0, 0, 0, 1), 0 0 5px rgba(107, 172, 197, 0.45);
	outline: 0 none;
}
#room-teambuilder .textbox::placeholder,
#room-teambuilder input[type="text"]::placeholder,
#room-teambuilder textarea::placeholder {
	color: #8c95a3;
}
#room-teambuilder .setdetails label,
#room-teambuilder .setstats label,
#room-teambuilder .setstats .statrow-head em {
	color: #b7c0ca;
}
#room-teambuilder .setdetails .detailcell {
	border-left-color: #464b50;
	color: #DDD;
}
#room-teambuilder .setstats .statrow {
	color: #DDD;
}
#room-teambuilder .setchart input.incomplete,
#room-teambuilder .setchart input.incomplete:focus {
	color: #ff6b6b;
	border-color: #dc143c;
}

/* Pokemon Full Box Validation Outlines: Empty = Light Gray, Valid = Pastel Green, Invalid = Crimson Red */
.mobile-team-card.card-state-empty,
.setchart.card-state-empty,
.setchart-nickname.card-state-empty {
	border: 2px solid #aeb6c2 !important;
}
.mobile-team-card.card-state-valid,
.setchart.card-state-valid,
.setchart-nickname.card-state-valid {
	border: 2px solid #98e6a8 !important;
}
.mobile-team-card.card-state-invalid,
.setchart.card-state-invalid,
.setchart-nickname.card-state-invalid {
	border: 2px solid #dc143c !important;
}
.tb-no-dynamic-outlines .mobile-team-card.card-state-valid,
.tb-no-dynamic-outlines .mobile-team-card.card-state-invalid,
.tb-no-dynamic-outlines .setchart.card-state-valid,
.tb-no-dynamic-outlines .setchart.card-state-invalid,
.tb-no-dynamic-outlines .setchart-nickname.card-state-valid,
.tb-no-dynamic-outlines .setchart-nickname.card-state-invalid {
	border-color: #aeb6c2 !important;
}
.tb-no-type-bg .typebg {
	background-image: none !important;
	background-color: #2c3138 !important;
}
.tb-no-type-bg .typebg::before {
	display: none !important;
}
.tb-use-sprites .mtc-model,
.tb-use-sprites .setcell-sprite-img {
	transform: scale(1.18);
	image-rendering: pixelated;
}
.hd-item-icons .mtc-item-box .itemicon {
	width: 28px;
	height: 28px;
	image-rendering: auto;
}
.hd-item-icons .itemicon,
.hd-item-icons .itemiconcol span {
	image-rendering: auto;
}
.hd-type-icon {
	height: 14px;
	width: 32px;
	object-fit: contain;
	vertical-align: middle;
	image-rendering: auto;
}
.mobile-launch-splash,
.teambar-num,
.mobile-abil-prefix,
.utilichart .sortrow .sortlabel,
.utilichart .sortrow .mobile-num-lbl {
	display: none;
}
.mobile-abil-name {
	font-weight: inherit;
}
@media (max-width: 639px) {
	.teamwrapper.mobile-teamview .setchart-nickname.card-state-empty,
	.teamwrapper.mobile-setview .setchart-nickname.card-state-empty,
	.teamwrapper.mobile-teamview .setchart-nickname.card-state-valid,
	.teamwrapper.mobile-setview .setchart-nickname.card-state-valid,
	.teamwrapper.mobile-teamview .setchart-nickname.card-state-invalid,
	.teamwrapper.mobile-setview .setchart-nickname.card-state-invalid {
		border-bottom: 0 !important;
	}
	.teamwrapper.mobile-teamview .setchart-nickname + .setchart.card-state-empty,
	.teamwrapper.mobile-setview .setchart-nickname + .setchart.card-state-empty,
	.teamwrapper.mobile-teamview .setchart-nickname + .setchart.card-state-valid,
	.teamwrapper.mobile-setview .setchart-nickname + .setchart.card-state-valid,
	.teamwrapper.mobile-teamview .setchart-nickname + .setchart.card-state-invalid,
	.teamwrapper.mobile-setview .setchart-nickname + .setchart.card-state-invalid {
		border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
	}
}

/*********************************************************
 * Home Screen Last-Updated Indicator (Settings Toggle)
 *********************************************************/

.client-updated-badge {
	display: none;
}
.show-last-updated-ui .client-updated-badge {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	position: fixed;
	left: 10px;
	top: 58px;
	z-index: 5;
	background: rgba(248, 248, 248, 0.9);
	color: #333;
	border: 1px solid #AAAAAA;
	border-radius: 5px;
	padding: 3px 8px;
	text-align: center;
	line-height: 1.2;
	box-sizing: border-box;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}
.dark.show-last-updated-ui .client-updated-badge {
	background: rgba(34, 37, 39, 0.9);
	color: #DDD;
	border-color: #6b7178;
	box-shadow: inset 0.5px 1px 2px rgba(0, 0, 0, 0.85), inset -0.5px -1px 1px rgba(255, 255, 255, 0.16);
}
.client-updated-badge .cub-title {
	font-size: 9.5px;
	font-weight: 700;
	opacity: 0.88;
}
.client-updated-badge .cub-time {
	font-size: 9.5px;
	font-weight: 600;
	white-space: nowrap;
}
.show-last-updated-ui .tiny-layout .activitymenu {
	position: relative;
	display: block;
	padding: 0 8px 6px;
	min-height: 36px;
	box-sizing: border-box;
}
.show-last-updated-ui .tiny-layout .client-updated-badge {
	position: absolute;
	left: 6px;
	top: 0;
	z-index: 2;
	padding: 2px 5px;
	max-width: 82px;
}
.show-last-updated-ui .tiny-layout .client-updated-badge .cub-title,
.show-last-updated-ui .tiny-layout .client-updated-badge .cub-time {
	font-size: 8.5px;
}
.show-last-updated-ui .tiny-layout .activitymenu .pmbox {
	width: min(210px, calc(100% - 180px));
	margin: 0 auto;
}
.show-last-updated-ui .tiny-layout .activitymenu:has(.pm-window > h3:not(.pm-minimized)) .pmbox {
	width: min(340px, calc(100% - 20px));
	padding-top: 34px;
	margin: 0 auto;
}
.show-last-updated-ui .tiny-layout .activitymenu .pm-window {
	width: 100%;
	margin: 0 0 8px 0;
}

/*********************************************************
 * Mobile Set View Redesign
 *********************************************************/

@media (max-width: 639px) {
	.teamwrapper.mobile-setview > .pad.msv-actionbar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 4px;
		padding: 6px 8px;
		min-height: 40px;
	}
	.msv-actionbar-right {
		display: flex;
		align-items: center;
		gap: 2px;
		flex-wrap: nowrap;
		overflow-x: auto;
	}
	.msv-actionbar-right button {
		background: transparent;
		border: 1px solid transparent;
		border-radius: 4px;
		padding: 3px 5px;
		font-size: 11px;
		color: #222;
		white-space: nowrap;
	}
	.dark .msv-actionbar-right button {
		color: #DDD;
	}
	.msv-actionbar-right button i {
		margin-right: 3px;
	}
	.msv-empty-actions {
		text-align: right;
		margin-bottom: 6px;
	}
	.msv-card,
	.teamwrapper.mobile-setview .msv-card.setchart.card-state-empty,
	.teamwrapper.mobile-setview .msv-card.setchart.card-state-valid,
	.teamwrapper.mobile-setview .msv-card.setchart.card-state-invalid {
		background: #DAE5F0;
		border: 2px solid #aeb6c2 !important;
		border-radius: 10px;
		padding: 9px;
		box-sizing: border-box;
		color: #1c222b;
		display: flex;
		flex-direction: column;
		gap: 8px;
		width: 100% !important;
		height: auto !important;
		margin-top: 0;
	}
	.dark .msv-card,
	.dark .teamwrapper.mobile-setview .msv-card.setchart.card-state-empty,
	.dark .teamwrapper.mobile-setview .msv-card.setchart.card-state-valid,
	.dark .teamwrapper.mobile-setview .msv-card.setchart.card-state-invalid {
		background: #535c66;
		color: #f0f4f8;
	}
	.msv-top {
		display: flex;
		align-items: flex-start;
		gap: 10px;
	}
	.msv-sprite-col {
		flex: 1 1 48%;
		min-width: 0;
	}
	.teamwrapper.mobile-setview .msv-sprite-col .setcell-sprite,
	.teamwrapper.mobile-setview .msv-sprite-col .setcell-sprite.typebg {
		width: 100%;
		height: 104px;
		margin: 0;
		padding: 4px;
		border-radius: 8px;
		border: 2px solid #aeb6c2 !important;
		display: flex;
		align-items: center;
		justify-content: center;
		box-sizing: border-box;
		position: relative;
		cursor: pointer;
	}
	.teamwrapper.mobile-setview .msv-card.card-state-valid .msv-sprite-col .setcell-sprite,
	.teamwrapper.mobile-setview .msv-card.card-state-valid .msv-sprite-col .setcell-sprite.typebg {
		border-color: #98e6a8 !important;
		box-shadow: 0 0 8px 1px rgba(152, 230, 168, 0.6), inset 0 0 4px rgba(152, 230, 168, 0.25) !important;
	}
	.teamwrapper.mobile-setview .msv-card.card-state-invalid .msv-sprite-col .setcell-sprite,
	.teamwrapper.mobile-setview .msv-card.card-state-invalid .msv-sprite-col .setcell-sprite.typebg {
		border-color: #dc143c !important;
		box-shadow: 0 0 9px 1px rgba(220, 20, 60, 0.7), inset 0 0 4px rgba(220, 20, 60, 0.3) !important;
	}
	.tb-no-dynamic-outlines .teamwrapper.mobile-setview .msv-card.card-state-valid .msv-sprite-col .setcell-sprite,
	.tb-no-dynamic-outlines .teamwrapper.mobile-setview .msv-card.card-state-valid .msv-sprite-col .setcell-sprite.typebg,
	.tb-no-dynamic-outlines .teamwrapper.mobile-setview .msv-card.card-state-invalid .msv-sprite-col .setcell-sprite,
	.tb-no-dynamic-outlines .teamwrapper.mobile-setview .msv-card.card-state-invalid .msv-sprite-col .setcell-sprite.typebg {
		border-color: #aeb6c2 !important;
		box-shadow: none !important;
	}
	.msv-meta-col {
		flex: 1 1 52%;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 5px;
	}
	.msv-label,
	.msv-quick-lbl {
		font-size: 10.5px;
		font-weight: 700;
		color: #5c6674;
		text-align: center;
		line-height: 1.1;
	}
	.msv-quick-lbl {
		font-size: 9.5px;
	}
	.dark .msv-label,
	.dark .msv-quick-lbl {
		color: #b8c2ce;
	}
	.msv-nickname-input,
	.msv-pill-input {
		width: 100% !important;
		height: 24px;
		border-radius: 9px !important;
		padding: 2px 8px !important;
		font-size: 11.5px !important;
		font-weight: 600;
		text-align: center;
		box-sizing: border-box;
		margin: 0 !important;
	}
	.msv-nickname-input::placeholder {
		color: #6e7784 !important;
		font-style: italic;
		opacity: 1;
	}
	.setcell-sprite-fade {
		position: absolute;
		inset: 0;
		margin: auto;
		max-width: 100%;
		max-height: 100%;
		width: auto;
		height: auto;
		object-fit: contain;
		z-index: 2;
		opacity: 1;
		transition: opacity 0.25s ease;
		pointer-events: none;
		filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.78)) drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
	}
	.tb-use-sprites .setcell-sprite-fade {
		transform: scale(1.18);
		image-rendering: pixelated;
	}
	.msv-shiny-sparkle {
		position: absolute;
		inset: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		z-index: 3;
		pointer-events: none;
	}
	.msv-shiny-sparkle svg {
		width: 68px;
		height: 68px;
		overflow: visible;
	}
	.msv-shiny-sparkle path {
		fill: #ffe36e;
		filter: drop-shadow(0 0 4px rgba(255, 215, 70, 0.95));
		transform-box: fill-box;
		transform-origin: center;
		animation: msvSparkleBurst 0.45s ease-out forwards;
	}
	.msv-shiny-sparkle .sp2 {
		animation-delay: 0.05s;
	}
	.msv-shiny-sparkle .sp3 {
		animation-delay: 0.09s;
	}
	@keyframes msvSparkleBurst {
		0% {
			opacity: 0;
			transform: scale(0.2) rotate(-25deg);
		}
		35% {
			opacity: 1;
			transform: scale(1.15) rotate(8deg);
		}
		100% {
			opacity: 0;
			transform: scale(0.45) rotate(32deg);
		}
	}
	.msv-quick-row {
		display: flex;
		align-items: flex-end;
		justify-content: space-between;
		gap: 3px;
		margin-top: 2px;
	}
	.msv-quick-item {
		flex: 1 1 0;
		min-width: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 3px;
	}
	.msv-quick-btn {
		width: 100%;
		height: 34px;
		background: #222527;
		color: #DDD;
		border: 1px solid #6b7178;
		border-radius: 8px;
		box-shadow: inset 0.5px 1px 2px rgba(0, 0, 0, 1), inset -0.5px -1px 1px rgba(255, 255, 255, 0.2), -0.5px -1px 1px rgba(255, 255, 255, 0.1);
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0;
		cursor: pointer;
		font-size: 13px;
		font-weight: 700;
		box-sizing: border-box;
	}
	.msv-quick-btn:active {
		transform: scale(0.96);
	}
	.teamwrapper.mobile-setview .msv-card.setchart input.msv-level-input {
		-webkit-appearance: none;
		appearance: none;
		width: 100% !important;
		max-width: none !important;
		height: 34px !important;
		min-height: 34px !important;
		line-height: 32px !important;
		text-align: center;
		padding: 0 !important;
		margin: 0 !important;
		font-family: inherit;
		font-size: 13px;
		font-weight: 700;
		color: #f0f4f8;
		background: #222527;
		border-radius: 8px;
		box-sizing: border-box;
		-moz-appearance: textfield;
		cursor: text;
	}
	.teamwrapper.mobile-setview .msv-card.setchart input.msv-level-input::-webkit-outer-spin-button,
	.teamwrapper.mobile-setview .msv-card.setchart input.msv-level-input::-webkit-inner-spin-button {
		-webkit-appearance: none;
		margin: 0;
	}
	.teamwrapper.mobile-setview .msv-card.setchart input.msv-level-input.msv-level-invalid {
		border-color: #dc143c !important;
	}
	.msv-item-btn .itemicon {
		display: block;
		width: 22px;
		height: 22px;
	}
	.msv-item-empty {
		width: 12px;
		height: 12px;
		border-radius: 50%;
		border: 1.5px dashed rgba(160, 170, 185, 0.5);
	}
	.msv-gender-btn {
		font-size: 17px;
		line-height: 1;
	}
	.msv-gender-svg {
		width: 17px;
		height: 17px;
		display: block;
		fill: none;
		stroke: currentColor;
		stroke-width: 2.3;
		stroke-linecap: round;
		stroke-linejoin: round;
	}
	.msv-gender-svg.msv-gender-rand {
		width: 18px;
		height: 18px;
		fill: initial;
		stroke: none;
	}
	.msv-gender-rand .dice-top {
		fill: #ffffff;
		stroke: #1b1f25;
		stroke-width: 1.15;
		stroke-linejoin: round;
	}
	.msv-gender-rand .dice-left {
		fill: #e4e9f2;
		stroke: #1b1f25;
		stroke-width: 1.15;
		stroke-linejoin: round;
	}
	.msv-gender-rand .dice-right {
		fill: #c8d1de;
		stroke: #1b1f25;
		stroke-width: 1.15;
		stroke-linejoin: round;
	}
	.msv-gender-rand .dice-pip {
		fill: #1b1f25;
		stroke: none;
	}
	.msv-gender-m {
		color: #3b9eff;
	}
	.msv-gender-f {
		color: #ff6b9d;
	}
	.msv-gender-n {
		color: #8c95a3;
	}
	.msv-shiny-btn svg {
		width: 19px;
		height: 19px;
		fill: #6f7885;
		transition: fill 0.15s ease, filter 0.15s ease;
	}
	.msv-shiny-btn.is-shiny svg {
		fill: #f5c542;
		filter: drop-shadow(0 0 4px rgba(245, 197, 66, 0.75));
	}
	.msv-item-search-row,
	.msv-move-search-row {
		display: flex;
		flex-direction: column;
		gap: 5px;
		margin-top: 8px;
		padding: 8px 9px;
		background: #DAE5F0;
		border: 1.5px solid #8b9bb0;
		border-radius: 10px;
		box-sizing: border-box;
		position: relative;
	}
	.dark .msv-item-search-row,
	.dark .msv-move-search-row {
		background: #535c66;
		border-color: #aeb6c2;
	}
	.msv-item-search-head {
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 14px;
	}
	.msv-item-search-icon {
		position: absolute;
		left: 2px;
		top: 0;
		font-size: 12px;
		color: #3a4654;
		pointer-events: none;
	}
	.dark .msv-item-search-icon {
		color: #d8e1eb;
	}
	#room-teambuilder .msv-item-search-input::placeholder {
		color: #6e7784 !important;
		font-style: italic;
		opacity: 1;
	}
	.msv-bottom {
		display: flex;
		align-items: stretch;
		gap: 10px;
	}
	.msv-left-col {
		flex: 1 1 48%;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 4px;
	}
	.msv-moves-lbl {
		margin-top: 2px;
	}
	.msv-move-row {
		position: relative;
		display: flex;
		align-items: center;
		height: 22px;
		background: #222527;
		border: 1px solid #6b7178;
		border-radius: 9px;
		padding: 0 18px;
		box-sizing: border-box;
		box-shadow: inset 0.5px 1px 2px rgba(0, 0, 0, 1), inset -0.5px -1px 1px rgba(255, 255, 255, 0.2), -0.5px -1px 1px rgba(255, 255, 255, 0.1);
	}
	.msv-move-row.msv-move-invalid {
		border-color: #dc143c !important;
	}
	.msv-move-row.msv-move-active {
		border-color: #ffffff !important;
		box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 6px rgba(107, 172, 197, 0.6) !important;
	}
	.msv-move-num {
		position: absolute;
		left: 7px;
		top: 50%;
		transform: translateY(-50%);
		font-size: 10.5px;
		font-weight: 700;
		line-height: 1;
		color: #b7c0ca;
		pointer-events: none;
	}
	#room-teambuilder .msv-move-row input.msv-move-input,
	#room-teambuilder .msv-move-row input.msv-move-input:hover,
	#room-teambuilder .msv-move-row input.msv-move-input:focus {
		flex: 1 1 auto;
		min-width: 0;
		width: 100%;
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
		padding: 0 2px !important;
		margin: 0 !important;
		height: 18px;
		font-size: 11px !important;
		font-weight: 600;
		color: #DDD;
		text-align: center;
		outline: none;
		cursor: pointer;
		caret-color: transparent;
		user-select: none;
		-webkit-user-select: none;
	}
	.msv-right-col {
		flex: 1 1 52%;
		min-width: 0;
		display: flex;
		flex-direction: column;
		gap: 4px;
	}
	#room-teambuilder .msv-stats-btn {
		flex: 1 1 auto;
		width: 100% !important;
		height: auto !important;
		min-height: 120px;
		border-radius: 9px !important;
		padding: 7px 8px !important;
		margin: 0 !important;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		gap: 4px;
		box-sizing: border-box;
	}
	.msv-stat-row {
		display: flex;
		align-items: center;
		gap: 4px;
		width: 100%;
		font-size: 9.5px;
		line-height: 1;
		color: #c9d2de;
	}
	.msv-stat-lbl {
		flex: 0 0 32px;
		text-align: right;
		font-weight: 600;
		white-space: nowrap;
	}
	.msv-stat-nature {
		font-weight: 700;
	}
	.msv-stat-bar-bg {
		flex: 1 1 auto;
		min-width: 0;
		height: 7px;
		background: rgba(255, 255, 255, 0.08);
		border-radius: 3px;
		overflow: hidden;
	}
	.msv-stat-bar-fill {
		display: block;
		height: 100%;
		border-radius: 3px;
	}
	.msv-stat-ev {
		flex: 0 0 auto;
		min-width: 24px;
		text-align: right;
		font-size: 9px;
		font-weight: 600;
		color: #d8e4f2;
	}
	.msv-stat-ev.msv-stat-ev-zero {
		color: #7a8696;
		font-weight: 500;
	}
	.msv-ability-card {
		margin-top: 8px;
		background: #DAE5F0;
		border: 1.5px solid #8b9bb0;
		border-radius: 10px;
		padding: 9px;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		gap: 7px;
	}
	.dark .msv-ability-card {
		background: #535c66;
		border-color: #aeb6c2;
	}
	.msv-ability-header {
		display: flex;
		align-items: center;
		gap: 8px;
	}
	.msv-ability-title {
		flex: 0 0 auto;
		font-size: 16px;
		font-weight: 700;
		color: #1c222b;
		white-space: nowrap;
	}
	.dark .msv-ability-title {
		color: #f0f4f8;
	}
	.msv-ability-input {
		flex: 1 1 auto;
		min-width: 0;
		width: 100% !important;
		height: 24px;
		border-radius: 9px !important;
		padding: 2px 8px !important;
		font-size: 11.5px !important;
		font-weight: 600;
		text-align: center;
		box-sizing: border-box;
		margin: 0 !important;
		cursor: pointer;
		caret-color: transparent;
		user-select: none;
		-webkit-user-select: none;
	}
	.msv-ability-desc {
		background: #222527;
		color: #DDD;
		border: 1px solid #6b7178;
		border-radius: 9px;
		padding: 8px 10px;
		font-size: 11.5px;
		line-height: 1.35;
		min-height: 44px;
		box-sizing: border-box;
		text-align: left;
		box-shadow: inset 0.5px 1px 2px rgba(0, 0, 0, 1), inset -0.5px -1px 1px rgba(255, 255, 255, 0.2), -0.5px -1px 1px rgba(255, 255, 255, 0.1);
	}
	.mobile-launch-splash {
		position: fixed;
		inset: 0;
		z-index: 99999;
		background: #e3e6eb;
		color: #1c222b;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
		box-sizing: border-box;
		font-family: Verdana, Helvetica, Arial, sans-serif;
		opacity: 1;
		transition: opacity 0.28s ease-out;
		pointer-events: auto;
	}
	.mobile-launch-splash.mls-reveal {
		opacity: 0;
		pointer-events: none;
	}
	.mls-flash {
		position: absolute;
		inset: 0;
		background: #ffffff;
		opacity: 1;
		transition: opacity 0.28s ease-out;
		pointer-events: none;
		z-index: 3;
	}
	.mobile-launch-splash.mls-active .mls-flash {
		opacity: 0;
	}
	.mls-center {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		margin-top: -8vh;
		opacity: 0;
		transform: translateY(4px);
		transition: opacity 0.35s ease-out, transform 0.35s ease-out;
	}
	.mobile-launch-splash.mls-active .mls-center {
		opacity: 1;
		transform: translateY(0);
	}
	.mls-eyebrow {
		font-size: 14px;
		font-weight: 600;
		color: #4b5563;
		letter-spacing: 0.4px;
		margin-bottom: 6px;
	}
	.mls-author {
		font-size: 32px;
		font-weight: 800;
		color: #111827;
		letter-spacing: -0.3px;
	}
	.mls-credits {
		position: absolute;
		left: 18px;
		right: 18px;
		bottom: calc(18px + env(safe-area-inset-bottom, 0px));
		text-align: center;
		font-size: 10px;
		line-height: 1.45;
		color: #5b6472;
		opacity: 0;
		transition: opacity 0.4s ease-out;
	}
	.mobile-launch-splash.mls-active .mls-credits {
		opacity: 1;
	}
	.mls-blackout {
		position: absolute;
		inset: 0;
		background: #000000;
		opacity: 0;
		transition: opacity 0.32s ease-in;
		pointer-events: none;
		z-index: 4;
	}
	.mobile-launch-splash.mls-to-black .mls-blackout {
		opacity: 1;
	}
}
