html {
    min-height: 100%;
    height: 100%;
}

body {
    font-family: Verdana;
    font-size: 90%;
    height: 100%;
    margin: 0px;
}

body.gameview {
    padding: 1ex;
}

p {
    max-width: 60ex;
}

ul li {
    max-width: 70ex;
}

h1 {
    font-size: 1.2em;
}

h2 {
    font-size: 1.2em;
}

h5 {
    font-family: Verdana;
    font-size: 90%;
}

div.faction-board {
    font: 14px Verdana;
    background-color: #eee;
    border-style: solid;
    border-width: 1px;
    border-color: #444;
    margin-bottom: 10px;
    padding: 5px;
    width: 1045px;
    float: left;
}

div.faction-info {
    float: left;
    width: 350px;
    white-space: nowrap;
}

div#shared-actions {
    height: 70px;
}

div.turn-order-block {
    display: inline-block;
    vertical-align: top;
    margin-right: 2ex;
}

div.turn-order-block b {
    margin-right: 1ex;
    vertical-align: top;
}

div.pool {
    font: 14px Verdana;
    background-color: #eee;
    border-style: solid;
    border-width: 1px;
    border-color: #444;
    margin-bottom: 10px;
    padding: 5px;
    width: 1045px;
    min-height: 220px;
    float: left;
}

div.bonus {
    font: 11px Verdana;
    border-style: solid;
    background-color: #ffd;
    border-width: 2px;
    margin: 2px;
    padding: 3px;
    width: 90px;
    height: 80px;
    float: left;
    white-space: nowrap;
}

div.favor {
    float: left;
    background-color: #f0e0e0;
    border-style: solid;
    border-width: 2px;
    font: 11px Verdana;
    margin: 2px;
    padding: 3px;
    width: 90px;
    height: 80px;
}

div#scoring {
    display: inline-block;
}

div.scoring {
    border-style: solid;
    border-width: 2px;
    font: 11px Verdana;
    margin: 2px;
    padding: 3px;
    width: 90px;
    height: 90px;
    background-color: #fff;
    float: left;
}

div.scoring-head {
    font-weight: bold;
}

div.town {
    float: left;
    background-color: #def;
    border-width: 2px;
    border-style: solid;
    font: 11px Verdana;
    margin: 2px;
    padding: 3px;
    width: 90px;
    height: 80px;
}

table#main-data {
    display: none;
}

table {
    border-style: none;
    border-width: 1px;
}

canvas#map {
    border-style: none;
    border-width: 1px;
    height: 500px;
    width: 800px;
}
canvas#cults {
    border-style: none;
    border-width: 1px;
    height: 500px;
    width: 250px;
}

canvas.action {
    float: left;
    height: 85px;
    width: 50px;
}

canvas.colorcycle {
    float: left;
    margin: 0px;
    padding: 6px;
    width: 90px;
    height: 80px;
}

div#error {
    background-color: #e33;
    font-weight: bold;
    width: 700px;
    margin: 20px; 
}

div.error-details {
    padding: 20px; 
    white-space: preserve;
    background-color: #e33;
    font-weight: normal;
}

div#action_required {
    background-color: #eee;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 5px;
    border-style: solid;
    border-width: 1px;
    max-width: 1045px;
}

div#next_game {
    background-color: #eec;
    margin-top: 10px;
    margin-bottom: 10px;
    padding: 5px;
    border-style: solid;
    border-width: 1px;
    max-width: 1045px;
}

div#next_game:empty {
    display: none;
}

table.income-table {
    border-spacing: 0px;
    margin-top: 10px;
    font: 14px Verdana;    
}

table.income-table tr td {
    padding-right: 2ex;
}

table.building-table {
    border-spacing: 0px;
    margin-top: 10px;
    font: 14px Verdana;    
}

table.building-table tr td {
    padding-right: 1ex;
    padding-left: 1ex;
}

table.building-table tr td:nth-child(odd) {
    background-color: #dcdcdc;
}

table.open-games tr:nth-child(odd) {
    background-color: #dcdcdc;
}

table.open-games tr td {
    vertical-align: top
}

table.interleave-row-colors tr:nth-child(odd) {
    background-color: #dcdcdc;
}

table.ranking-table td {
    vertical-align: top;
}

table.ranking-table tr:nth-child(5n+1) {
    background-color: #dcdcdc;
}

table.ranking-breakdown-table {
    background-color: #fff;
}

table.ranking-breakdown-table tr:nth-child(5n+1) {
    background-color: #fff;
}

table.vp-breakdown {
    font: 14px Verdana;    
}

table.time-taken-table {
    border-spacing: 0px;
}

table.time-taken-table tr td:nth-child(odd) {
    background-color: #dcdcdc;
}

table.time-taken-table tr td {
    padding-left: 10px;
    padding-right: 10px;
}

span.faction-info-unimportant {
    color: #888;
}

span.faction-info-building-max {
    color: #f00;
}

span.faction-info-income-overflow {
    color: #f00;
}

span.faction-info-not-applicable {
    text-decoration: line-through;
}

table#ledger {
    border-spacing: 0px;
    padding-bottom: 40px;
    white-space: nowrap;
}

table#ledger tr td {
    margin: 0px;
    font: 14px Verdana;
}

table#ledger tr td.ledger-delta {
    padding-left: 1ex;
    padding-right: 0.5ex;
}

table#ledger tr td.ledger-value {
    padding-right: 1ex;
    padding-left: 0.5ex;
    color: #888;
}

span.warning {
    background-color: #e88;
}

span.bold {
    font-weight: bold;
}

div#preview_status {
    font: 14px Verdana;
    font-weight: bold;
}

pre#preview_commands {
    width: 60ex;
    background-color: #eee;
    margin-left: 20px;
}

div#data_entry {
    margin-bottom: 10px;
}

div#data_entry_tabs {
    margin-bottom: 10px;
}

div#move_entry_explanation {
    margin-top: 5px;
    font: 14px Verdana;
    font-weight: bold;
    max-width: 60ex;
}

div#planning_entry_explanation {
    margin-top: 5px;
    font: 14px Verdana;
    max-width: 60ex;
}

table#recent_moves {
    margin-top: 5px;
    margin-left: 10px;
}

div#header {
    margin-bottom: 5px;
    background-color: #eee;
    padding: 5px;
    border-style: solid;
    border-width: 1px;
    max-width: 1045px;    
}

div#header div {
    min-width: 150px;
    display: inline-block;
}

div#user-info {
}

div.changelog {
    min-width: 60ex;
}

div.changelog-entry {
    margin-left: 2ex;
}

tr#game-status-finished {
    color: #ccc;
}

tr.game-status-finished td { 
    background-color: #ccc;
}

tr.game-status-action-required td {
    background-color: #cfc;
}

tr.game-status-action-unread-chat td {
    background-color: #ccf;
}

tr.game-status-dropped td {
    background-color: #f88;
}

tr.game-status-dropping-soon td {
    background-color: #f44;
}

table.gamelist {
    margin-left: 2ex;
    max-width: 80ex;
}

table.gamelist thead {
    background-color: #ddd;
}

table.gamelist td {
    padding-right: 2ex;
    white-space: nowrap;
}

button {
    margin-right: 5px;
    margin-bottom: 2px;
}

div#settings table tr td {
    vertical-align: top
}

div#settings ul {
    margin-top: 0px
}

table.settings-table td {
    padding-left: 2ex;
    vertical-align: top;
}

table#chat_messages td {
    vertical-align: top;
}

tr.chat-message-hidden {
    display: none;
}

a.turnlink {
    color: #888;
}

span.navi-selected {
    padding-top: 5px;
    font-weight: bold;
}

a.navi {
    color: #00f;
    line-height: 150%;
}

a.static-color {
    color: #00f;
}

a.passthrough-color {
    color: inherit;
}

div.menu {
    position: absolute;
    padding: 2px;
    padding-left: 5px;
    padding-right: 5px;
    border-style: solid;
    border-width: 2px;
    background-color: #ddd;
}

div.menu div.menu-item {
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
}

/* Sidebar */

div.layout-sidebar {
    padding-left: 5ex;
    padding-top: 4ex;
    min-height: 90%;
}

div#sidebar {
    white-space: nowrap;
    width: 12ex;
    float: left;
}

div.sidebar-top {
    height: 4ex;
}

div.sidebar-top h3 {
    margin-top: 0ex;
}

div.sidebar-content {
    margin-left: 14ex;
    height: 100%;
}

div.sidebar-section {
    margin-bottom: 2ex;
}

h4.sidebar-section-header {
    margin-top: 1em;
    margin-bottom: 0px;
    margin-left: -1ex;
    color: #004;
}

textarea#fallback-editor {
    height: 300px;
    width: 800px;
}

span.cult-FIRE {
    background-color: #f88
}

span.cult-WATER {
    background-color: #ccf
}

span.cult-EARTH {
    background-color: #b84
}

span.cult-AIR {
    background-color: #f0f0f0
}

div.final-scoring {
    font: 11px Verdana;
    margin: 2px;
    width: 90px;
    height: 90px;
    float: left;
}

table.final-scoring {
    padding: 0px;
    border-spacing: 0px;
}

div.motd {
    max-width: 60ex;
    border-style: solid;
    border-width: 1px;
    padding: 5px;
    margin-top: 1em;
    background-color: #eef;
}

table.newgame-settings {
    border-collapse: collapse
}

table.newgame-settings tr {
    vertical-align: top;
}

table.newgame-settings tr td {
    padding-top: 20px;
}

table.newgame-settings tr td p {
    margin-top: 0px;
}

div.footer {
   font-size: 80%;
   padding: 10px;
   text-align: center;
}

div.stats-settings {
    display: inline-block;
    margin-right: 20px;
}

div.settings-chessclock-label {
    width: 15ex;
    display: inline-block;
    margin-bottom: 5px;
}

/* Manual */

div#postamble {
    display: none;
}

pre.example {
    border: 1pt solid #AEBDCC;
    background-color: #F3F5F7;
    padding: 5pt;
    font-family: courier, monospace;
    width: 60ex;
    font-size: 90%;
    overflow:auto;
}

/* Mobile overrides */
@media only screen and (max-device-width: 480px) {
    body {
        padding: 0ex;
    }

    /* Eat flames and die, mobile WebKit and your "font boosting" that never
       works. */
    div#game-root * {
        max-height: 1000000px;
    }

    /* Sidebar layout should be a top bar layout on mobile. */
    div.layout-sidebar {
        padding: 0.5ex;
    }

    div#sidebar {
        float: none;
        padding: 1ex;
    }

    div#sidebar div.sidebar-section{
        display: inline-block;
        min-width: 13ex;
        vertical-align: top;
    }

    div.sidebar-content {
        margin-left: 1ex;
    }

    /* Enlarge the action area in game view (roughly factor of 2). */
    div#action_required, pre#preview_commands, div#preview_status {
        font-size: 200%;
    }

    div#action_required button {
        font-size: 100%;
    }

    div#next_game {
        font-size: 300%;
    }

    div#next_game button {
        font-size: 100%;
    }

    div#header a {
        font-size: 200%;
    }

    div#data_entry button, input, textarea, select {
        font-size: 200%;
    }

    table.gamelist {
        font-size: 125%;
    }

    div#menu {
        font-size: 200%;
    }

    div#menu button {
        font-size: 100%;
    }
}