div[id*="pcard"] .popover { left: -6em !important; }
div[id*="dcard"] .popover { left: -6em !important; }
@media (prefers-color-scheme:light) {
  :root {
		--elementcolor: linear-gradient(#e0a4f0, #c24dea);
    --elementbordercolor: #9e43c4;
    --gamebackground: #c67be650;
		--gamebuttoncolor: linear-gradient(#5bd6f2, #1584b7);
		--gamebuttonhovercolor: linear-gradient(#8dd7f0, #3fa6e2);
		--gamebuttonbordercolor: #249ec0;
		--cardbackground: url(/img/cards/lightcard.webp);
  }
}
@media (prefers-color-scheme:dark) {
  :root {
		--elementcolor: linear-gradient(#8f38a8, #5d1775);
    --elementbordercolor: #571672;
    --gamebackground: #15041950;
		--gamebuttoncolor: linear-gradient(#3886a8, #175475);
		--gamebuttonhovercolor: linear-gradient(#3480bf, #316e96);
		--gamebuttonbordercolor: #085a87;
		--cardbackground: url(/img/cards/darkcard.webp);
  }
}
@media (orientation:landscape) {
	:root {
		--gameheight: 70vh;
	}
  .floating {
		position: fixed;
		margin: 0;
	}
}
@media (orientation:portrait) {
	:root {
		--gameheight: 60vh;
	}
  .floating {
    position: sticky;
		flex-direction: column;
    top: 1em;
    margin-bottom: 1em;
		padding: 0.5em 1em;
  }
	.floating p {
		margin: 0 .5em;
	}
  #balance {
    flex-grow: 1;
  }
}
.topline {
  border-top: 2px solid var(--elementbordercolor);
}
.gamebuttons button {
	background-image: var(--gamebuttoncolor);
	border-color: var(--gamebuttonbordercolor);
  min-width: max-content;
}
.gamebuttons button:hover {
	background-image: var(--gamebuttonhovercolor);
}
.gamebuttons button:disabled, .gamebuttons button:disabled:hover {
	cursor: default;
	background-image: var(--buttondisabled);
	border-color: var(--buttonborderdisabled);
	box-shadow: 0.25em 0.5em 1em var(--shadowcolor);
}
section#back {
  margin-top: 3em;
}
div#wagerbox {
  display: flex;
  justify-content: center;
  font-family: 'BlenderPro', monospace;
	margin-top: 1em;
  align-items: center;
}
div#wagerbox label {
  font-size: var(--textsize);
  margin: 0;
  padding: 0.25em;
}
input {
	position: relative;
	top: 0;
  background-color: var(--gamebackground);
	border: 2px solid var(--elementbordercolor);
	border-radius: 0.25em;
  color: var(--textcolor);
  font-size: var(--textsize);
	width: 8em;
  height: 100%;
  padding: 0.25em;
  margin: 0;
}
#game {
	background: var(--gamebackground);
	border: 2px solid var(--elementbordercolor);
  border-radius: 0.5em;
	color: var(--textcolor);
	font-family: 'BlenderPro', monospace;
  text-align: center;
	height: var(--gameheight);
  display: flex;
  justify-content: center;
  align-content: center;
	margin: 0 var(--sidemargin);
	position: relative;
	width: auto;
  overflow: hidden;
}
div.card {
	background: #FFF;
	border-radius: .35rem;
	box-shadow: 0 0 1px #000;
	display: inline-block;
	height: 112px;
	margin: 0 5px;
	position: absolute;
	right: 0;
	width: 85px;
}
.down {
	background-image: var(--cardbackground) !important;
	background-size: 100% 100% !important;
}
span.pos-0 {
	left: 0.5em;
	position: absolute;
	top: 0.25em;
}
span.pos-1 {
	bottom: 0.25em;
	filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
	position: absolute;
	right: 0.5em;
	transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  -webkit-transform: rotate(180deg);
}
span.rank {
	font-size: 1rem;
}
span.suit {
	font-size: 0.6rem;
}
.black {
	color: #232323;
}
.red {
	color: #cd2929;
}
#actions {
	margin: 15px 0 0 0;
    text-align: center;
}
.alert {
	transform: translate(0px, -100px);
	z-index: 100;
}
#alert {
	margin: 0 auto;
	position: relative;
	text-align: center;
	width: auto;
	z-index: 0;
  font-size: var(--textsize);
}
.dealerPoints {
	position: absolute;
	left: 0;
	top: 30%;
}
.playerPoints {
	position: absolute;
	left: 0;
	top: 60%;
}