.players {
    display: flex;
    flex-flow: row wrap;

}

.players h2 {
    text-align: center;
    margin: 0 0 .4em;
}

.players section, .players .next {
    margin: 5px;
    padding: 5px;
    background-color: #202020;
}

.playeraction {
    display: inline-block;
    cursor: pointer;
    outline: 1px dotted;
    width: 1.4em;
    text-align: center;
}

.player {
    flex: 1 auto;
}

.player h2 {
    text-align: left;
}

.player h2 .attacking,
.player.attacking h2 .defending {
    display: none;
}

.player.attacking h2 .attacking,
.player h2 .defending {
    display: inline-block;
}

.player table {
    width: 100%;
}

.player table td {
    padding: 5px 0;
}

.player table td:first-child {
    width: 150px;
    text-align: left;
    font-weight: bold;
}

.player table input {
    width: 100%;
    padding: .3em .5em;
    box-sizing: border-box;
}

.player .bonus td {
    text-align: left;
}

.player .bonus ul {
    padding: 0;
    margin: 0;
}

.player .bonus li {
    display: flex;
    margin: 5px 0;
}

.player .bonus li.lead {
    font-weight: bold;
}

.player .bonus li span {
    text-align: center;
}

.player .bonus li span.name {
    flex: 10 3 10px;
}

.player .bonus li span.value {
    flex: 2 3 10px;
}

.player .bonus li span.active {
    flex: 1 3 10px;
}

.player .bonus li span.active input {
    margin: .5em 0;
}

.player .bonus button,
.player .specials button {
    padding: .3em 0;
    width: 100%;
    cursor: pointer;
}


.player .actionButtons {
    float: right;
}

.player .actionButtons button {
    white-space: nowrap;
    padding: .2em .6em;
    width: 2.2em;
    overflow-x: hidden;
    transition: width .5s;
    cursor: pointer;
}

.player .actionButtons button:hover {
    width: 170px;
}

.player .actionButtons button i {
    display: inline-block;
    width: 1em;
    padding-right: .6em;
}

section.modifier {
    flex: 1 100%;
}

section.action {
    flex: 1 100%;
    font: 100 2em "Open Sans";
}

section.action input {
    display: inline-block;
    width: 300px;
    font: 100 1em "Open Sans";
    text-align: center;
}

section.action .attacker {
    display: inline-block;
    width: 300px;
    text-align: right;
}

section.action .defender {
    display: inline-block;
    width: 300px;
    text-align: left;
}

section.action .switch {
    display: block;
    margin: auto;
}

.players .next {
    display: block;
    flex: 1 100%;
    font: bold 3em "Present Script";
    padding: .2em 0 .5em;
}


/*******************************************/
#dialogWrapper {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, .5);
    overflow-y: auto;
}

#dialogWrapper section {
    background-color: #101010;
    margin: 50px auto;
    border: 1px solid
}

section#presets {
    width: 300px;
}

section#presets ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

section#presets li {
    width: 270px;
    list-style: none;
    padding: 10px 15px;
    height: 1.2em;
    text-align: right;
}

section#presets li:hover {
    background-color: #202020;
}

section#presets li span {
    float: left;
}

section#presets li i {
    font-style: normal;
    color: transparent;
    cursor: pointer;
    font-size: 1.2em;
    margin: 0 .2em;
    vertical-align: middle;
}

section#presets li:hover i {
    color: #d00000;
}

section#presets button {
    margin: 10px;
    width: 280px;
    padding: 5px;
}


/*******************************************/
section#specials {
    max-width: 700px;
}

section#specials ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

section#specials li input {
    display: none;
}

section#specials label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: .6em;
}

section#specials label:hover {
    background-color: #202020;
}

section#specials label span.active {
    flex: 1 3 10px;
}

section#specials label strong {
    flex: 6 3 10px;
}

section#specials label span.desc {
    flex: 12 3 10px;
    font-size: .9em;
}

section#specials label span.active i {
    border: 1px solid;
    display: inline-block;
    width: 1em;
    height: 1em;
    border-radius: 50%;
}

section#specials input:checked ~ label span.active i {
    background-color: #E0E040;
}

section#specials .buttons {
    margin: 1em 0 0;
}

section#specials .buttons button {
    margin: 10px;
    width: 280px;
    padding: 5px;
}


/*******************************************/
section.result {
    background: #202020;
    padding: 10px;
    margin: 10px;
}

section.result h2 {
    margin: 0 0 .8em;
}

section.result span.raw {
    display: inline-block;
    vertical-align: middle;
}

section.result span.raw object {
    height: 6em;
}

section.result span.btext {
    display: inline-block;
    vertical-align: middle;
    margin: 0 5px;
    padding: 0 0 1em;
}

section.result span.btext span {
    display: block;
    font-size: .9em;
}

section.result span.btext strong {
    display: block;
    font: 100 3em 'Open Sans';
}

/*******************************************/
textarea#gmtext {
    box-sizing: border-box;
    margin: 10px;
    width: calc(100% - 20px);
}

section.resultcode {
    background: #202020;
    padding: 10px;
    margin: 10px;
}

section.resultcode h2 {
    margin: 0 0 .8em;
}


section.resultcode .source {
    margin: 10px 0;
    padding: 25px 10px 10px;
    position: relative;
    cursor: pointer;
    font: normal 1em Consolas;
    text-align: left;
    border: 1px solid;
    background: #202020;
    word-break: break-all;
}

section.resultcode .source:before {
    content: '\041D\0430\0436\043C\0438\0442\0435  \043D\0430  \0431\043B\043E\043A  \0434\043B\044F  \0432\044B\0434\0435\043B\0435\043D\0438\044F';
    color: #E08010;
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    text-align: center;
}

section.resultcode .source:hover:before {
    color: #F3AF5F;
}