.barnum
{
    position: absolute;
    margin: 0px;
    padding: 0px;
    width: 5%;
    height: 5%;
    pointer-events: none;
}

.dice
{
    position: absolute;
    left: 0px;
    top: 0px;
}

.imgdice
{
    width: 100%;
    height: 100%;
}

.pieces
{
    margin: 0px;
    padding: 0px;
    display: block;
    border: 0px;
    border-width: 0px;
    z-index: 1;
    width: 97%;
    height: 16.6%;
}

.bars, .barsb
{
    position: absolute;
    margin: 0px;
    padding: 0px;
    width: 6.25%;
    height: 45%;
    overflow: hidden;
}

.onbar
{
    position: absolute;
    margin: 0px;
    padding: 0px;
    width: 6.25%;
    height: 43%;
    border: 1px solid black;
}

.body
{
    margin: 0px;
    padding: 0px;
    border: 0px;
    color: #404040;
}

.commandbar
{
}

.header
{
    border: 1px solid black;
}

.boardbg
{
    border: 0px;
    z-index: 0;
}

#boarddialog {
}

.boardelements {
    user-select: none;
    -webkit-user-select: none;
}

.boardbg, .boardelements {
    max-height: 100vh;
    width: 100%;
    position: absolute;
    left: 0px;
    top: 0px;
}

#boarddialog {
    width: 100%;
    margin: 0px;
    border: 0px;
    padding: 0px;
    left: 0px;
    top: 0px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 1000px) {
    .barnum
    {
        font-size: 0.8em;
    }
}

#blackbearoff {
    top: 50%;
}

#blackbearoffname {
    top: 85%;
}

#whitebearoffname {
    top: 40%;
}


@media (max-width: 800px) {
    .whitepip { top: 0.25%; }
    .onbar { height: 41%; }
    .blackpip { top: 95.5%; }
    #blackbearoff { top: 53%; }
    #blackbearoffname { top: 86%; }
    #whitebearoffname { top: 39%; }
    .barnum { font-size: 0.7em; }
    .boardstacknum { line-height: 180%; }
}

@media (max-width: 600px) {
    .barnum {
        font-size: 0.5em;
    }
    .boardstacknum {
        line-height: 150%;
    }
}

.infoinner { height: 100% }
#boardtr {
    height: 100%;
}

#tabpage1 > table {
    width: 100%;
}

#boarddialog > table.reference {
    padding: 3px;
    padding-top: 0px;
    padding-bottom: 0px;
}

#comments {
    width: 100%;
}

#tabmenu {
    width: 100%;
    margin-top: 3px;
    margin-bottom: 3px;
}

#tabtablemiddle {
    width: 100%;
}

.dicedata {
    display: none;
    width: 100%;
    height: 100%;
}

.cube {
    width: 100%;
    height: auto;
}

div.container
{
    width: 100%;
    margin: 0px;
    border: 0.125% solid gray;
}

div.header,div.footer
{
    padding:0.5em;
    clear:left;
}
h1.header
{
    padding: 0;
    margin: 0;
}

div.left
{
    position: relative;
    float: left;
    width: 90%;
    height: 90%;
    margin: 0;
    padding: 1em;
}

div.right
{
    margin-left: 100%;
    height: 100%;
    border-left: 0.125% solid gray;
}

.page
{
    z-index: -1;
}

.tableexpand
{
}

.offpieces
{
    padding-bottom: 0.125%;
}

.boardtable { width: 60%; height: 100%;}
.infotable { height: 100%; }
.commentsinner { height:85%; border: 1px solid black; margin: 0.125%; overflow-y:auto }
.infoinsideinner { height:100%; overflow-y:auto }
.commentsparent { border: 1px solid black;}
.spinner { left: 44.375%; top: 40%; position:absolute;}
.infoinner { float:left; }

.gameinfoplayer {
    width: 15%;
}

.tournamentInfo {
    width: 12%;
}

.dateInfo {
    width: 8%;
}

.fileInfo {
    width: 4%;
}

.positionTypeInfo {
    width:12%;
    overflow-x:hidden;
    white-space: nowrap;
}

.crawfordth {
    width: 7%;
}

.lengthth,.scoreth {
    width: 4%;
    white-space: nowrap;
}

@media (max-width: 650px) {
.scoreth {
    width: 3%;
}
.gameinfoplayer {
    width: 10%;
}
}
 
@media (max-width: 1200px) {
    .tournamentInfo,.dateInfo {
        display: none;
    }
    .gameinfoplayer {
        width: 10%;
    }
}

.boardbg, .boardelements {
}

@media (max-width: 650px)
and (orientation: landscape) {
    .boardbg, .boardelements {
    }
    .pieces {
        height: 16.6%;
    }
    .crawfordth {
        width: 5%;
    }
    .lengthth {
        width: 3%;
    }
}

#fchat {
    border:2px solid black;
    overflow:auto;
    height: 100%;
    min-height: 100px;
}

#schat {
    height:100px;
    border:2px solid black;
    overflow:auto;
    resize: both;
}

#newboardtable, #boardtd, #duelchat, #duelchat_ads, #infotd, #boarddialog, .commentsparent, #tabtable, #tabtablemiddle, #comments, #PanelTop, #duelchathome {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
}

#newboardtable, #duelchat, #duelchat_ads, #dchat, #infotd, #PanelTop, #commentsparent, #boarddialog, #tabtable, #tabtablemiddle, #comments, #page1, #tabpage1, #duelchathome, #hchat, #dchat2 {
    flex-grow: 1;
    -webkit-flex-grow: 1;
    -ms-flex-grow: 1;
}

#boardtd, #duelchat, #duelchat_ads, #infotd, #boarddialog, #tabtable, #tabtablemiddle, #comments, #PanelTop, #duelchathome {
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
}

#newboardtable {
    height: 90%;
    width: 100%;
    border-spacing: 0px;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
}

#boardtd {
    flex-grow: 2;
    -webkit-flex-grow: 2;
    -ms-flex-grow: 2;
    width: 60%; // ?
}

.boarddiv
{
    position: relative;
    float: left;
}

#dchat, #hchat, #dchat2 {
    border: 2px solid black;
    overflow: auto;
}

#duelchatinput, #schatinput, #fchatinput {
    background-color: #e7e7e7;
}

#duelchatinput, #tabmenu, #tabcommands, #PanelTopHeader, #schatinput, #fchatinput {
    flex-grow: 0;
    -webkit-flex-grow: 0;
    -ms-flex-grow: 0;
}

#PanelTop, #commentsparent {
    -webkit-flex-basis: 35vh;
    -ms-flex-basis: 35vh;
    flex-basis: 35vh;
    overflow: auto;
}

#tabtablemiddle, #comments, #tabpage1
{
    -webkit-flex-basis: 30vh;
    -ms-flex-basis: 30vh;
    flex-basis: 30vh;
}

#tabcommands {
    -webkit-flex-basis: 3vh;
    -ms-flex-basis: 3vh;
    flex-basis: 3vh;
}

#PanelTop {
    border: 1px solid black;
}

#duelchat, #duelchathome, #duelchat_ads {
    min-height: 10vh;
}

#duelchat_ads {
    margin: 0 auto;
}

/* Landscape */
@media only screen 
and (max-device-width: 568px)
and (orientation: landscape) {
#tabcommands {
    -webkit-flex-basis: 7vh;
    -ms-flex-basis: 7vh;
    flex-basis: 7vh;
}
}
#page1 {
    flex-grow: 1;
    -webkit-flex-grow: 1;
    -ms-flex-grow: 1;
    overflow-x: hidden;
}

@media (max-device-width: 650px)
and (orientation: landscape) {
    #buttonaction1,#buttonaction2,#buttonaction3, #buttonaction5, #chatbutton {
        font-size: 0.8em;
    }
}
.whitepip, .blackpip {
    position: absolute;
    font-size: 1.5vw;
}
#whiteclock, #blackclock, #whiteclockadd, #blackclockadd {
    font-size: 1.2vw;
}
