body {
    margin: 0px;
    height: 100%;
}

#header {
    position: absolute;
    z-index: 1;
    width: 100%;
    top: 0px;
    height: 50px;
    background-color: #887;
    background-image: url("stone.png");
    background-size: 489px 50px;
    box-sizing: border-box;
    border-bottom: 1px solid #765;
    font-family: "Libre Baskerville", serif;
}

#header h1 {
    font-size: 20px;
    margin-left: 20px;
    color: #FFF;
    text-shadow: 2px 2px 3px #A93, -2px -2px 3px #A93;
}

#appcontrols {
    position: absolute;
    height: 50px;
    right: 0px;
    font-family: "Lato";
}

#menubutton {
    background: #FFD;
    color: black;
    border: 1px solid #888;
    border-radius: 4px;
    margin: 12px 8px;
    padding: 2px 2px 0px 2px;
}
#menubutton.Selected {
    background: #F0C056;
}

#menubutton img {
    width: 24px;
    height: 18px;
}

.Menu {
    display: none;
    top: 48px;
    right: 0px;
    width: 240px;
    text-align: center;
    position: absolute;
    background: #FDA;
    box-sizing: border-box;
    padding: 10px;
    border-left: 1px solid #FA8;
    border-bottom: 1px solid #FA8;
    border-bottom-left-radius: 8px;
}

.Menu.MenuOpen {
    display: block;
}

.Menu button {
    background: white;
    color: black;
    border: 1px solid #888;
    border-radius: 4px;
    padding: 4px 4px;
    margin: 2px 4px;
}

.Menu button.Selected {
    background: #F0C056;
}

.Menu img.ArrangeIcon {
    width: 32px;
    height: 24px;
}

.Menu label {
    font-size: 85%;
}

#gamebody {
    position: absolute;
    width: 100%;
    top: 50px;
    bottom: 0px;
    background: #0000;
    pointer-events: none;
    margin: 0px;
    box-sizing: border-box;
}

#appbody {
    position: absolute;
    width: 100%;
    top: 50px;
    bottom: 0px;
    background: #EEE;
    margin: 0px;
    box-sizing: border-box;
    font-family: "Lato";
    line-height: 1.33;
}

#gameport {
    position: absolute;
    overflow: hidden;
    width: 100%;
    height: 100%;
    background: #CCAA88;
    margin: 0px;
    pointer-events: auto;
}

#commentarypane {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 75%;
    max-width: 400px;
    background: #B0FFB0;
    box-sizing: border-box;
    border: 4px solid #40D040;
    border-radius: 16px;
    box-shadow: 2px 2px 12px 4px #00000040;
}

#commentaryheader {
    background: #70E870;
    min-height: 22px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

#commentarytitle {
    font-family: "Courier Prime";
    font-size: 100%;
    margin-left: 20px;
}

#commentaryclose {
    width: 30px;
    height: 20px;
    background: #40D040;
    border-bottom-left-radius: 8px;
    float: right;
    text-align: center;
    color: #CFC;
    font-weight: bold;
}
#commentaryclose span {
    pointer-events: none;
}

.ViewPane {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #FFFFFE;
    box-sizing: border-box;
}

.SourcePane {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background: #FFFFFE;
    box-sizing: border-box;
}

.Arrange12 #gameport {
    left: 0px;
    width: 50%;
    top: 0px;
    height: 100%;
}
.Arrange12 .ViewPane {
    right: 0px;
    width: 50%;
    top: 0px;
    height: 50%;
    border-bottom: 1px solid #888;
}
.Arrange12 .SourcePane {
    right: 0px;
    width: 50%;
    bottom: 0px;
    height: 50%;
}

.Arrange111 #gameport {
    left: 0px;
    width: 33%;
    top: 0px;
    height: 100%;
}
.Arrange111 .ViewPane {
    left: 33%;
    right: 33%;
    width: 34%;
    top: 0px;
    height: 100%;
    border-right: 1px solid #888;
}
.Arrange111 .SourcePane {
    right: 0px;
    width: 33%;
    bottom: 0px;
    height: 100%;
}

.Arrange21 #gameport {
    left: 0px;
    width: 50%;
    top: 0px;
    height: 50%;
}
.Arrange21 .ViewPane {
    left: 0px;
    width: 50%;
    bottom: 0px;
    height: 50%;
    border-right: 1px solid #888;
}
.Arrange21 .SourcePane {
    right: 0px;
    width: 50%;
    height: 100%;
}

.Arrange121 #gameport {
    left: 0px;
    width: 50%;
    top: 0px;
    height: 50%;
}
.Arrange121 .ViewPane {
    right: 0px;
    width: 50%;
    top: 0px;
    height: 50%;
}
.Arrange121 .SourcePane {
    width: 100%;
    bottom: 0px;
    height: 50%;
}

.TabBar {
    flex: 0 0 auto;
    width: 100%;
    min-height: 32px;
    background: #DFDCCF;
    overflow: hidden;
    padding-left: 8px;
    box-sizing: border-box;
}

.TabBar .TabItem {
    display: inline-block;
    font-size: 85%;
    margin: 4px 4px;
    padding: 2px 8px;
    background: #F4F4F0;
    border: 1px solid #888;
    border-radius: 8px;
}

.TabBar .TabItem span {
    pointer-events: none;
}

.TabBar .TabItem.Selected {
    background: #FFD066;
}

.TabBar .TabItem.Flashing {
    animation: buttonflash 0.3s linear alternate;
    animation-iteration-count: infinite;
}

@keyframes buttonflash {
    0% { background: #FFFFFF; }
    100% { background: #B0FFB0; }
}

.TabBar .TabLabel {
    display: inline-block;
    font-weight: bold;
    margin: 4px 4px;
}

.TabBar button.NavButton {
    font-weight: bold;
    background: #F4F4F0;
    border: 1px solid #888;
    border-radius: 4px;
    margin: 0px 2px;
}

.TabBar button.NavButton:disabled, .TabBar button.NavButton:disabled:active {
    color: #888;
    background: #DFDCCF;
}

.TabBar button.NavButton:active {
    background: white;
}

.TabContent {
    flex: 1 1 auto;
    width: 100%;
    height: 1px;
}

.ScrollContent {
    width: 100%;
    height: 100%;
    padding: 10px 20px;
    box-sizing: border-box;
    overflow-y: scroll;
}

.ScrollContent h2 {
    font-size: 120%;
}

.AboutPage h2 {
    font-size: 110%;
    font-family: "Libre Baskerville", serif;
}

.AboutPage a {
    color: #00C;
}

.AboutPage a.Internal {
    color: #A40;
}
.AboutPage code {
    font-size: 90%
}

.AboutPage hr {
    border: none;
    height: 1px;
    background: #AAA;
    margin-left: 40px;
    margin-right: 40px;
}

.Commentary {
    font-style: italic;
}
.Commentary em {
    font-style: normal;
}

.Commentary p {
    margin: 16px 20px;
}

.Commentary code {
    font-size: 85%;
}

.Commentary a.External {
    color: #00C;
}

.Commentary a.Internal {
    color: #A40;
}
.Commentary a.SourceOnly {
    color: #A40;
    text-decoration-style: dashed;
}

.Commentary .Com_Id {
    font-family: "Courier Prime";
    font-size: 85%;
}

ul.DataList {
    list-style: none;
    padding-left: 0px;
}

ul.DataList ul {
    padding-left: 20px;
}

.DataList li {
    padding-left: 4px;
}

.DataList li.Selected {
    background: #FFDD88;
}

.DataList li.IsRoom {
    margin-top: 10px;
}

.DataList li.Filename {
    margin-top: 4px;
    margin-bottom: 4px;
}

.DataList li.ContainsLabel {
    font-size: 85%;
    font-style: italic;
    padding-left: 25px;
}

code {
    font-family: "Courier Prime";
}

.ObjLabel {
    float: right;
    font-family: "Courier Prime";
    font-size: 75%;
    background: #888;
    color: white;
    padding: 1px 3px 0px 3px;
    border-radius: 4px;
    margin-left: 4px;
    margin-right: 4px;
    margin-top: 4px;
}
.ObjLabelRoom {
    background: #C75;
}
.ObjLabelGlob {
    background: #69C;
}
.ObjLabelItem {
    background: #87C;
}

button.ObjPage {
    font-family: "Courier Prime";
    font-weight: bold;
    font-size: 85%;
    line-height: 1em;
    background: white;
    color: #444;
    border: 1px solid #888;
    border-radius: 8px;
    padding: 3px 2px 0px 3px;
    margin-left: 3px;
    margin-right: 3px;
}

.ObjPageBack {
    float: right;
}
.ObjPageBack a {
    font-size: 85%;
    color: #A40;
}

a.CommentButton {
    position: relative;
    top: -4px;
    float: right;
    padding: 1px;
    border: none;
    margin-left: 8px;
    background: none;
}

a.CommentButton img {
    width: 36px;
    height: 27px;
}

a.CommentButtonSmall {
    position: relative;
    float: right;
    padding: 1px;
    border: none;
    margin-left: 8px;
    background: none;
}

a.CommentButtonSmall img {
    width: 24px;
    height: 18px;
}

.PrintString {
    font-family: "Libre Baskerville", serif;
    font-size: 90%;
    font-weight: bold;
}

.PrintDictWord {
    font-family: "Libre Baskerville", serif;
    font-size: 90%;
    font-weight: bold;
}

.ShowAddr {
    font-size: 85%;
}

.ChangedNote {
    font-weight: bold;
    color: #B00;
    padding-left: 2px;
    padding-right: 1px;
}

.DelAttr {
    text-decoration-line: line-through;
    text-decoration-color: #B00;
}

.TimerActive {
    font-size: 130%;
}
.TimerInactive {
    font-size: 130%;
    color: #AAA;
}

#scrollcontent_file.ScrollContent {
    padding-left: 8px;
}

.SourceFile {
    display: block flow-root;
    white-space: pre-wrap;
    font-family: "Courier Prime";
    font-size: 90%;
}

.SourceFile > div {
    border-left: 8px solid #FFFFFE;
    padding-left: 8px;
}

.SourceFile .Selected {
    background: #FFDD88;
}

.SourceFile .SelRange {
    border-left: 8px solid #FFDD88;
}

.SourceFile .Hilit {
    background: #FFF4DD;
}

.LineExtraHeight {
    line-height: 38px;
}

.LineExtraHeightSmall {
    line-height: 23px;
}

.Src_Comment {
    color: #292;
}

.Src_Ifndef {
    color: #999;
}

.Src_Str {
    color: #A44;
    font-weight: bold;
}

.Src_Dict {
    color: #A2A;
}

.Src_Iddef {
    color: #44C;
    font-weight: bold;
}

.Src_Id {
    color: #44C;
}

.Src_Localid {
    color: #850;
}

a.Src_Id {
    text-decoration: none;
}
a.Src_Id:hover {
    text-decoration: underline;
}

