html, body {
    height: 100%;
}
body {
    font-family: Georgia, 'Droid Serif', 'DejaVu Serif', serif;
    font-size: 12pt;
    color: white;
    background: black;
    margin: 1em;
}
#tale-page {
    max-width: 90%;
    margin: auto;
}

h1, h2, h3, h4, h5 {
    font-weight: normal;
    margin-top: 1em;
    margin-bottom: 1ex;
}
h1 { font-size: 160%; }
h2 { font-size: 140%; }
h3 { font-size: 120%; }
h4 { font-size: 100%; }
h5 { font-size: 100%; }

h1 {
    text-shadow: 2px 2px 4px rgba(150, 150, 150, 1);
}

.txt-monospaced, .txt-userinput, pre, #input-cmd, .text-field {
    font-family: Monaco, "DejaVu Sans Mono", "Bitstream Vera Sans Mono", Consolas, "Courier New", monospace;
    line-height: 1.2;
    font-size: 11pt;
}

p {
    line-height: 1.4;
}
pre {
    white-space: pre;
    font-size: 11pt;
}

#input-cmd {
    padding: 3px;
    border: 1px inset gainsboro;
    border-radius: 5px;
}
.location {
    text-align: left;
    margin-bottom: 4pt;
    font-style: italic;
}
.location > span {
    color: green;
}

#textframe {
    border: 1px solid gainsboro;
    overflow: auto;
    height: 33em;
    margin-bottom: 3px;
    padding: 3px;
    border-radius: 10px;
}

#cmd-form {
    padding: 1ex;
    border: 1px solid gainsboro;
    border-radius: 10px;
}

p, pre {
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.txt-bright {
    color: darkgreen;
    font-weight: bold;
}
.txt-normal {}
.txt-dim {
    color: cadetblue;
}
.txt-ul {
    text-decoration: underline;
}
.txt-it {
    font-style: italic;
}
.txt-rev {
    background-color: darkslateblue;
    color: white;
}
.txt-location {
    color: navy;
    font-weight: bold;
}

.txt-userinput {
    color: maroon;
    font-style: italic;
    padding-left: 2em;
    padding-top: 1em;
    display: block;
}

.server-error {
    color: white;
    background-color: maroon;
    font-style: italic;
}

#img-logo {
    vertical-align: top;
}

.start-story-link {
    font-size: 200%;
    text-shadow: 2px 2px 4px rgba(150, 150, 150, 1);
}

.chat-container {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 10px;
}

.user-name, .location-name {
    margin-bottom: 5px;
}

.user-image {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    margin-right: 10px;
}

.text-field {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ddd;
    color: white;
    border-radius: 5px;
}

.location-image {
    width: 100%;
    max-width: 512px;
    height: auto;
    display: block;
    border-radius: 10px;
    z-index: 1;
}

.location-container {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 512px;
    margin-top: 20px;
    margin-left: auto;
    position: relative;
}

.npc-dropdown {
    width: 100px;
}

.action-dropdown {
    width: 150px;
}

.flex-container {
    display: flex;
    padding: 3px;
}

.flex-container input {
    margin-left: 3px;
}

.flex-container input[type="text"] {
    flex-grow: 1;
    width: 100%;
}

#top-container {
    display: flex;
}

#dialogOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 70%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

#saveDialog {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

#storyFrame {
    display: flex;
    max-width: 100%;
    box-sizing: border-box;
}

#text-container {
    flex: 1;
    min-width: 0;
    overflow: auto;
    margin-right: 10px;
}

#npc-images {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

.npc-image {
    width: 96px;
    min-width: 0;
    height: auto;
    transition: opacity 1s ease;
    margin: 10px;
    border-radius: 10px;
}

.npc-image.visible {
    opacity: 1;
}

.npc-image.invisible {
    opacity: 0;
}

.npc-image.hidden {
    display: none;
}

.attack-button {
    background: #f00;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    cursor: pointer;
}

.npc-container {
    display: flex;
    flex-wrap: wrap;
}