body {
	margin: 0px;
	font-family: Helvetica, sans-serif;
	font-size: 12px;
	-webkit-text-size-adjust: none;
	-webkit-user-select: none;
	transform-origin: 50% 50%;
}

#devout {
	position: fixed;
	top: 0;
	right: 0;
	width: 400px;
	height: 100%;
	overflow: hidden;
	pointer-events: none;
	display: none;
}
#cookies {
	position: fixed;
	bottom: 16px;
	right: 16px;
	padding: 8px 16px;
	margin-left: 16px;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	border-radius: 16px;
	text-align: right;
	display: none;
}
pre#out {
	font-family: menlo, monospace;
	font-size: 10px;
	/*color: #fff;*/
}

#dragbar {
	display: none;
}
#app #dragbar {
	display: block;
	position: fixed;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 32px;
	overflow: hidden;
	-webkit-app-region: drag;
}
#app .appdisabled {
	display: none;
}
body#app {
	font-size: 12px;
}
.mmonly_b, .inonly_b,
.mmonly_ib, .inonly_ib,
.planetin_ib, .planetin_b,
.gearin_ib, .gearin_b,
.chainin_ib, .chainin_b {
	display: none;
} 
body.unitmm .mmonly_b,
body.unitin .inonly_b,
div.planetinput .planetin_b,
div.gearinput .gearin_b,
div.chaininput .chainin_b {
	display: block;
}
body.unitmm .mmonly_ib,
body.unitin .inonly_ib,
div.planetinput .planetin_ib,
div.gearinput .gearin_ib,
div.chaininput .chainin_ib {
	display: inline-block;
}

h1 {
	margin-top: 16px;
	font-size: 20px;
	display: none;
}
h2 {
	margin: 0;
	padding: 0;
	margin-top: 6px;
	margin-bottom: 4px;
	font-size: 15px;
	font-weight: bold;
}
#app h2 {
	font-size: 15px;
	margin-top: 2px;
	margin-bottom: 4px;
}
h2 + p,
h3 + p {
	margin-top: 0px;
	padding-top: 0px;
}
h3 {
	margin: 0;
	padding: 0;
	margin-top: 8px;
	margin-bottom: 4px;
	font-size: 14px;
	font-weight: bold;
}

p.title, p.stitle {
	margin: 16px 0px -16px 0px;	
}
#app p.title {
	margin: 0px;
}
a {
	text-decoration: none;
	font-style: italic;
}
span.rem {
	opacity: 0.5;
}
label {
	display: inline-block;
	width: 120px;
	vertical-align: text-top;
}
label.h2 {
	font-size: 15px;
	font-weight: bold;
	line-height: 13px;
}
.ratio {
	width: 30px;
}
button {
	-webkit-appearance: none;
	appearance: none;
	font-family: Helvetica, sans-serif;
	font-size: 12px;
	border-radius: 4px;
	padding: 3px 10px 3px 10px;
	min-width: 24px;
	margin: 2px 5px 5px 2px;
}
#app button {
	font-size: 12px;
	padding: 3px 10px 3px 10px;
	min-width: 24px;
}
button.first {
	border-radius: 4px 0 0 4px;
	margin-right: 0px
}
button.last {
	border-radius: 0 4px 4px 0px;
	margin-left: 1px;
}
button.first.afterselect {
	margin-left: 6px;
}
button.next {
	border-radius: 0;
	margin-left: 1px;
	margin-right: 0px;
}
button.select {
	width: 63px;
}

select, input {
	-webkit-appearance: none;
	appearance: none;
	font-family: Helvetica, sans-serif;
	font-size: 12px;
	max-width: 126px;
	border-radius: 4px;
	margin: 2px 5px 5px 2px;
}
select.unitless, input.unitless {
	max-width: 60px;
}
#app select, #app input{
	font-size: 12px;
	max-width: 80px;
	padding: 3px 0 2px 4px;
}
select {
	width: 86px;
	max-width: 86px;
}
input.nameinput {
	width: 192px;
	max-width: 192px;
}
input.thecheckbox {
	width: 19px;
	height: 21px;
	overflow: hidden;
	vertical-align: middle;
}
input.thecheckbox:after {
	content: '\2715';
}
/*input.thecheckbox:checked:after {
	content: '\2715';
}*/
#panel {
	position: fixed;
	margin: 0px;
	padding: 0px 10px 32px 16px;
	top: 0px;
	bottom: 40px;
	width: 368px;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-box-sizing: -webkit-border-box;
	box-sizing: border-box;
}
#app #panel {
	top: 40px;
	width: 360px;
}
#screencontainer {
	position: absolute;
	top: 0px;
	left: 367px;
	right: 0px;
	bottom: 0px;
	overflow: auto;
}
#app #screencontainer {
	left: 367px;
}
#screen {
	overflow: hidden;
	/*min-width: 100%;
	min-height: 100%;*/
	width: 100%;
	height: 100%;
}
#panel, #screencontainer {
	scrollbar-width: thin;			/* firefox scrollbar fix */
}
::-webkit-scrollbar,
::-webkit-scrollbar-corner {
	width: 8px;
	height: 8px;
	background: none;
}
::-webkit-scrollbar-track {
	background: none;
}
::-webkit-scrollbar-thumb {
	width: 8px;
	height: 8px;
	border-radius: 8px;
}

/*.geartype {
	width: 40px;
	height: 32px;
	background-color: #f00;
}*/
.geartype {
	vertical-align: middle;
	padding:  4px 3px 1px 4px;
}

.svg  {
	position: absolute;
	width: 0px;
	height: 0px; 
	overflow: visible;
	margin: 0px;
	padding: 0px;
	/*border-radius: 50%;*/
}
.svgcontainer {
	position: absolute;
	margin: 0px;
	padding: 0px;
	overflow: visible;
	user-select: none;
}
select, input, textarea {
	padding: 3px 0 3px 4px;
}
textarea {
	margin-top: 4px;
	width: 392px;
	height: 104px;
}
#animpanel {
	margin-top: 32px;
	margin-bottom: 8px;
}
#app #animpanel {
	margin-top: 12px;
}
#unitpanel {
	margin-top: 8px;
	margin-bottom: 8px;
}
#gearlist {
	margin-top: 8px;
	margin-bottom: 16px;
}
#gearlist ul {
	padding: 0px;
	margin: 3px 0px 6px 0px;
}
#gearlist ul li {
	list-style: none;
	margin: 0 -16px;
	padding: 3px 16px;
	max-width: 368px;
}
#gearlist p {
	margin: 4px 0px;
}
.listitem {
	cursor: pointer;
}
#footer {
	position: fixed;
	height: 40px;
	bottom: 0px;
	padding: 0px 16px;
	width: 368px;
	-webkit-box-sizing: -webkit-border-box;
	box-sizing: border-box;
}
#app #footer {
	width: 368px;
}
#contentcover {
	position: absolute;
	top: -100px;
	left: 0px;
	height: 100px;
	width: 359px;
	background: none;
	pointer-events: none;
}
#app #contentcover {
	width: 359px;
}
.col0 #contentcover {
	background: linear-gradient(to top, rgba(248,248,248,1), rgba(248,248,248,0));
}
.col1 #contentcover {
	background: linear-gradient(to top, rgba(0,113,184,1), rgba(0,113,184,0));
}
.col2 #contentcover {
	background: linear-gradient(to top, rgba(34,34,34,1), rgba(34,34,34,0));
}

#screen.nolabels g.geartext {
	display: none;
}
#screen.noguides g.gearguides {
	display: none;
}
#units,
#about {
	margin: 16px 0;
	padding-right: 16px;
}
#about h2 {
	margin-bottom: 8px;
}

#CPS {
	transform: translateY(15px);
}
.svgcontainer.dimmed {
	opacity: 0.3;
}
/* light colors */
body.col0 {
	background: #f8f8f8;
	color: #444;
}
.col0 input, .col0 select, textarea,
.col0 button {
	background: #ddd;
	color: #444;
}
.col0 #footer,
.col0 a {
	color: #444;
}
.col0 #panel,
.col0 #footer {
	border-right: #ddd solid 1px;
}
.col0 #screencontainer {
	background: #f8f8f8;	/*	248,248,248	*/
}
.col0 button {
	border: 1px solid #ddd;
}
.col0 button.radio {
	background: #ddd;
	border-color: #ddd;
}
.col0 button.radio.selected {
	background: #666;
	border-color: #666;
	color: #f8f8f8;
}
.col0 button.radio.selected:hover,
.col0 button:hover {
	background: #444;
	color: #f8f8f8;
	border-color: #444;
}
.col0 input, .col0 select, textarea {
	border: 1px #ddd solid;
}
.col0 input.thecheckbox:after {
	color: #ddd;
}
.col0 input.thecheckbox:checked:after {
	color: #444;
}
.col0 #footer g.text {
	opacity: 0.5;
}
.col0 .svgcontainer.selected .gear, 
.col0 .svg:hover .gear {
	fill: rgba(118,202,255,0.5 );
}
.col0 .svgcontainer.selected .gear.chainpoly {
	fill: rgba(238,238,238,0.2);
}
.col0 .gear {
	fill: rgba(238,238,238,0.8);
}
.col0 .gearicon {
	fill: #444;
}
.col0 button.selected .gearicon,
.col0 button:hover .gearicon {
	fill: #f8f8f8;
}
.col0 .gear,
.col0 g.text polyline,
.col0 g.guides circle,
.col0 g.text polyline {
	stroke: #444;
}
.col0 g.guides {
	opacity: 0.8;
}
.col0 g.guides circle.pitch {
	opacity: 0.5;
}
.col0 g.guides circle.base {
	opacity: 0.3;
}
.col0 g.guides circle.root,
.col0 g.guides circle.outer {
	opacity: 0.2;
}
.col0 circle.firstmarker {
	fill: #444;
}
.col0 #gearlist li {
	color: rgba( 68,68,68, 0.5 );
}
.col0 #gearlist li.selected {
	background: #444;
	color: #f8f8f8;
	font-weight: bold;
}
.col0 .shareicon {
	fill: #444;
}
body.col0 ::-webkit-scrollbar-thumb {
	background: rgba( 68,68,68, 0.2 );
}


/* blueprint colors */
body.col1 {
	background: #0071b8;
	color: #fefefe;
}
.col1 input, .col1 select, textarea,
.col1 button {
	background: #3f8fd0;
	color: #fefefe;
}
.col1 #footer,
.col1 a {
	color: #fefefe;
}
.col1 #panel,
.col1 #footer {
	border-right: #3f8fd0 solid 1px;
}
.col1 #screencontainer {
	background: #0071b8;	/*	248,248,248	*/
}
.col1 button {
	border: 1px solid #3f8fd0;
}
.col1 button.radio {
	background: #377FC6;
	border-color: #377FC6;
}
.col1 button.radio.selected {
	background: #3f8fd0;
	border-color: #3f8fd0;
}
.col1 button.radio.selected:hover,
.col1 button:hover {
	background: #fefefe;
	color: #0071b8;
	border-color: #fefefe;
}
.col1 input, .col1 select, textarea {
	border: 1px #3f8fd0 solid;
}
.col1 input.thecheckbox:after {
	color: #3f8fd0;
}
.col1 input.thecheckbox:checked:after {
	color: #fefefe;
}
.col1 #footer g.text {
	opacity: 0.5;
}
.col1 .svgcontainer.selected .gear, 
.col1 .svg:hover .gear {
	fill: rgba( 51,141,204, 0.8 );
}
.col1 .svgcontainer.selected .gear.chainpoly {
	fill: rgba(0, 113, 184, 0.2);
}
.col1 .gear {
	fill: rgba(0, 113, 184, 0.8);
}

.col1 .gearicon {
	fill: #fefefe;
}
.col1 button:hover .gearicon {
	fill: #0071b8;
}
.col1 .gear,
.col1 g.text polyline,
.col1 g.guides circle,
.col1 g.guides polyline {
	stroke: #fefefe;
}
.col1 g.guides {
	opacity: 0.8;
}
.col1 g.guides circle.pitch {
	opacity: 0.5;
}
.col1 g.guides circle.base {
	opacity: 0.3;
}
.col1 g.guides circle.root,
.col1 g.guides circle.outer {
	opacity: 0.2;
}
.col1 circle.firstmarker {
	fill: #fefefe;
}
.col1 #gearlist li {
	color: rgba( 255,255,255, 0.5 );
}
.col1 #gearlist li.selected {
	background: #fefefe;
	color: #0071b8;
	font-weight: bold;
}
.col1 .shareicon {
	fill: #fff;
}
body.col1 ::-webkit-scrollbar-thumb {
	background: rgba(220,220,255,0.2);
}


/* dark colors */
body.col2 {
	background: #222;
	color: #ccc;
}
.col2 input, .col2 select, textarea,
.col2 button {
	background: #444;
	color: #ccc;
}
.col2 #footer,
.col2 a {
	color: #ccc;
}
.col2 #panel,
.col2 #footer {
	border-right: #444 solid 1px;
}
.col2 #screencontainer {
	background: #1c1c1c;
}
.col2 button {
	border: 1px solid #444;
}
.col2 button.radio {
	background: #444;
	border-color: #444;
}
.col2 button.radio.selected {
	background: #888;
	border-color: #888;
	color: #222;
}
.col2 button.radio.selected:hover,
.col2 button:hover {
	background: #ccc;
	color: #222;
	border-color: #ccc;
}
.col2 input, .col2 select, textarea {
	border: 1px #444 solid;
}
.col2 input.thecheckbox:after {
	color: #444;
}
.col2 input.thecheckbox:checked:after {
	color: #ccc;
}
.col2 #footer g.text {
	opacity: 0.5;
}
.col2 .gear {
	fill: rgba(48, 48, 48, 0.8);
}
.col2 .gearicon {
	fill: #ccc;
}
.col2 button.selected .gearicon,
.col2 button:hover .gearicon {
	fill: #222;
}
.col2 .gear,
.col2 g.text polyline,
.col2 g.guides circle,
.col2 g.guides polyline {
	stroke: #ccc;
}
.col2 .svgcontainer.selected .gear, 
.col2 .svg:hover .gear {
	fill: rgba( 70,130,170,0.5 );
}
.col2 .svgcontainer.selected .gear.chainpoly {
	fill: rgba(48, 48, 48, 0.2);
}
.col2 g.guides {
	opacity: 0.8;
}
.col2 g.guides circle.pitch {
	opacity: 0.5;
}
.col2 g.guides circle.base {
	opacity: 0.3;
}
.col2 g.guides circle.root,
.col2 g.guides circle.outer {
	opacity: 0.2;
}
.col2 circle.firstmarker {
	fill: #ccc;
}

/*.col2 .svg.selected circle.firstmarker, 
.col2 .gear:hover circle.firstmarker {
	fill: #fefefe;
}*/
.col2 #gearlist li {
	color: #888;
}
.col2 #gearlist li.selected {
	background: #ccc;
	color: #222;
	font-weight: bold;
}


.col2 #panel g.text polyline {
	stroke: #ccc;
}
.col2 .shareicon {
	fill: #ccc;
	/*stroke-width: 0.5;
	stroke: #ccc;*/
}
body.col2 ::-webkit-scrollbar-thumb {
	background: rgba( 204,204,204, 0.2 );
}

#PCHB {
	position: fixed;
	right: 8px;
	top: 8px;
}
#PCHBsh {
	position: fixed;
	right: 24px;
	top: 24px;
	width: 256px;
	height: 200px;
	border-radius: 8px;
	box-shadow: 0 10px 32px rgba( 0,0,0, 0.2 );
	pointer-events: none;
}
#gobanner, #closebanner {
	pointer-events: all;
	cursor: pointer;
}
#closebanner {
	opacity: 0;
}
#PCHB.dimmed {
	opacity: 0;
}
#PCHB.dimmed:hover,
#PCHB:hover #closebanner {
	opacity: 1;
}


#DWNLD_wrapper {
	opacity: 1;
	
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	text-align: center;
	
	font-size: 120%;
	
	background: rgba(0,0,0, 0.8);
}
#DWNLD_wrapper h2 {
	font-size: 150%;
	margin-bottom: 16px;
}
.hidden {
	opacity: 0 !important;
	pointer-events: none;
}
.hidden2 {
	display: none !important;
}
.disabled {
	opacity: 0.3 !important;
	pointer-events: none;
}
#DWNLD_container {
	position: relative;
	top: 50%;
	transform: translateY(-50%);
	margin: 0 auto;
	width: 80%;
	min-width: 500px;
	max-width: 600px;
	height: 432px;
	overflow: hidden;
	padding: 32px;
	color: #fff;
}
ul.prices {
	list-style: none;
	text-align: left;
	display: block;
	margin: 24px auto;
	width: intrinsic;
	padding: 0;
}
ul.prices li {
	clear: left;
	height: 35px;
	margin-bottom: -1px;
	padding-top: 9px;
	padding-right: 20px;
}
ul.prices li .price {
	display: inline-block;
	font-size: 20px;
	font-weight: bold;
	width: 100px;
	text-align: right;
	margin-right: 16px;
}
ul.prices li {
	border: 1px solid #fff;
}
ul.prices li:first-child {
	border-radius: 10px 10px 0 0;	
}
ul.prices li:last-child {
	border-radius: 0 0 10px 10px;	
}
ul.prices li:hover,
ul.prices li.selected {
	background: #fff;
	color: #000;
}
#DWNLD_container button {
	font-family: Helvetica, sans-serif;
	font-weight: bold;
	font-size: 20px;
	border-radius: 20px;
	padding: 8px 20px;
	min-width: 32px;
	margin: 2px auto;
	background: none;
	color: #fff;
}
#DWNLD_container button {
	border: 1px solid #fff;
}
#DWNLD_container button:hover {
	background: #fff;
	color: #000;
}

#downloadsvg,
#priceselect,
#PCHB, #PCHB g,
#DWNLD_wrapper {
	-webkit-transition: opacity 0.5s ease-in-out;
	-moz-transition:    opacity 0.5s ease-in-out;
	-o-transition: 	    opacity 0.5s ease-in-out;
	-ms-transition:     opacity 0.5s ease-in-out;
	transition: 	    opacity 0.5s ease-in-out;
}
.rem {
	opacity: 0.4;
}

.type0, .type1, .type2 {
	display: none;
}

.disp0 .type0,
.disp1 .type1,
.disp2 .type2 {
	display: block;
}
.disp0 .type0.disabled,
.disp1 .type1.disabled,
.disp2 .type2.disabled {
	display: none;
}

#checker.overlayinput {
	border: 1px solid #fff;
	min-width: 200px;
	height: 20px;
	background: none;
	padding: 10px 16px 9px;
	font-size: 20px;
	margin: 2px 16px 2px 2px;
}
#checkmail {
	display: none;
}
.pay a {
	cursor: pointer;
}
#demo {
	position: fixed;
	top: 0;
	right: 0;
	display: none;

	margin: 16px;
	background: rgba(0,0,0,0.5);
	padding: 0 16px 0 24px;
	border-radius: 32px;
	font-size: 15px;
	
}
#demo button {
	border:  1px solid #fff;
	background: none;
	font-size: 15px;
	
}
#demo button:hover {
	border:  1px solid #fff;
	background: #fff;
	color: #000;	
}
::placeholder {
  color: #fff;
  opacity: 1;
}
#demo input {
	border:  1px solid #fff;
	background: none;
	margin: 0 6px 0 16px;
	width: 160px;
	max-width: 160px;
	font-size: 15px;
	padding: 3px 8px 3px 8px;

}
#demo p {
	margin: 10px 0;
}


span.disabled button {
	display: none;
}


/* Free version - Control download section visibility properly */
#DWNLD_wrapper {
    display: none;
    position: relative;
    z-index: 1000;
}

#DWNLD_wrapper.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#DWNLD_container {
    background: rgba(0, 0, 0, 0.9);
    padding: 20px;
    border-radius: 8px;
    margin: 20px;
    border: 2px solid #333;
}

#downloadlink {
    display: block !important;
    visibility: visible !important;
}

#downloadsvg, #downloaddxf, #downloadassembly {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Hide payment elements permanently */
.pay {
    display: none !important;
    visibility: hidden !important;
}

#priceselect {
    display: none !important;
}

#checkmail {
    display: none !important;
}

/* Free version styling */
.free-download-notice {
    color: #4CAF50 !important;
    font-weight: bold !important;
    text-align: center !important;
    margin: 20px 0 !important;
}

