p, div, small, a {
    word-wrap: anywhere;
}
body, html { 
    background: #E0D0BA;
    background: var(--main-color);
    margin: 0; 
    width: 100%; 
    height: 100%;
    font: 89% Verdana;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: initial;
    padding: 0px;
    margin: 0px;
    color: #625D57;
    color: var(--text-color);
    margin-bottom: 5px;
}
p {
    padding: 0px;
    margin: 0px;
    color: black;
    color: var(--text-color);
    white-space: break-spaces;
}
small {
    color: #625D57;
    color: var(--text-color)
}
fieldset {
    background: var(--post-textarea-markdown-color);
    border: 1px solid var(--main-darkest-color);
    margin-bottom: 10px;
}
legend {
    color: var(--main-darkest-color);
}
input[type="text"], input[type="password"], textarea, input[type="datetime-local"], select {
    min-height: 30px;
    width: 100%;
    box-sizing: border-box;
    padding-left: 5px;
    outline: none !important;
    margin-bottom: 2px;
}
a, .reply, #markdown span { cursor: pointer }
textarea {
    display: flex;
    resize: vertical;
    border: none;
    flex-grow: 1;
    outline: none !important;
    min-height: 56px;
    font-family: inherit;
    font-size: 93%;
}
option {
    font-family: attr(value);
    font-weight: attr(value);
}
button {
    border-radius: 0px;
    border-width: 0px;
    background: var(--nav-darker-color);
    padding: 4px;
    color: var(--main-color);
    cursor: pointer;
    margin-left: 1px;
    float: right
}
button:hover {
    background: var(--main-color);
    color: var(--nav-darker-color);
    outline: 1px solid var(--nav-darker-color);
    outline-offset: -1px
}
#home button {
    float: initial;
}
.nosmooth #content {
    transition: none !important;
}
.hidden { 
    display: none; 
    visibility: collapse; 
    width: 0px !important; 
    height: 0px !important;
    margin: 0px !important;
    padding: 0px !important
}
.invisible {
    opacity: 0
}
.column { display: flex; flex-direction: column }
.row { display: flex; flex-direction: row }
.grow { display: flex; flex-grow: 1 }
#popup-window {
    width: 100%;
    height: 100%;
    position: absolute;
    background: #0000004d;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    z-index: 999;
}
#dialog {
    position: relative;
    width: 75%;
    height: 75%;
    background: white;
    background: var(--main-color);
    overflow: hidden;
    box-shadow: 0 0 5px #00000094;
    opacity: 0;
    transition : all .3s;
    -wekit-transition : all .3s;
    -moz-transition : all .3s;
    padding: 10px;
    box-sizing: border-box;
}
#dialog:has(iframe) {
    padding: 0px
}
#dialog iframe {
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
    border: none;
}
@media (width < 612px) {
    #dialog { width: 100% }
}
.tabs {
    display: flex;
    margin-top: 4px;
    flex-direction: row;
}
.tab {
    background: #C4B5A1;
    background: var(--main-darker-color);
    border: 1px solid #8D8377;
    border: 1px solid var(--main-darkest-color);
    padding: 6px 10px;
    margin: 0px 6px;
    z-index: 3;
    color: #8D8377;
    color: var(--main-color);
    cursor: pointer;
    transition: all .3s;
}
.tab.selected {
    background: #E0D0BA;
    background: var(--main-color);
    border-bottom: 1px solid #E0D0BA;
    border-bottom: 1px solid var(--main-color);
    color: var(--main-darkest-color);
}
#tabs-settings {
    margin-bottom: 12px;
    position: relative;
}
#tabs-settings::after {
    border-bottom: 1px solid #8D8377;
    border-bottom: 1px solid var(--main-darkest-color);
    height: 29px;
    width: 100%;
    content: '';
    position: absolute;
    z-index: 0;
}
.settings-preferences {
    margin-top: 2px;
    width: 100%;
    height: 100%;
}
#themes {
    margin: 14px 0px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
}
.theme {
    display: flex;
    flex-grow: 1;
    border: 1px solid var(--nav-color);
    height: 200px;
    cursor: pointer
}
#mm-ips {
    clear: both;
    margin-top: 31px;
}
.theme:hover, .theme.selected { border: 1px solid var(--main-lighter-color) }
.theme iframe { width: 100%; height: 100%; border: none; pointer-events: none }
.table { 
    display: table; 
    border-spacing: 0px 16px;
    table-layout: fixed
}
.table .list-item { display: table-row }
.list-title {
    color: #625D57;
    color: var(--text-color);
    vertical-align: top;
    padding-right: 10px;
    min-width: 29%;
    word-wrap: break-word;
}
.list-content {
    width: 75%;
}
#mc-profile-custom, #mc-custom-site-css { height: 200px }
.table .list-title, .table .list-content { display: table-cell }
#content, #notifications {
    transition: left 1000ms ease-in-out;
}
.swatch {
    width: 36px;
    height: 18px;
    border: 1px solid white;
    margin-right: 3px;
    padding: 0px;
    cursor: pointer;
    position: relative;
}
input, textarea, select, div.swatch {
    border: 1px solid var(--main-darkest-color);
    background: var(--input-color);
    color: var(--main-darkest-color);
}
input[type="color"]::-moz-color-swatch {
    display: inline-block;
    content: "";
    background: url("/images/cross.png") 10px no-repeat;
    background-color: transparent;
    border: none;
}
input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
    margin: 0;
}
input[type="color"]::-webkit-color-swatch {
	display: inline-block;
    content: "";
    background: url("/images/cross.png") 10px no-repeat;
    background-color: transparent;
    border: none;
}
input[type="checkbox"] {
    margin: 0px 4px 0px 0px;
    transform: translateY(0.075em);
}
.swatch.selected {
    outline: 1px solid black;
}
input.swatch {
    height: 20px;
}
.img-preview p {
    margin: 4px 0px;
}
.img-preview img {
    height: 55px;
}
.main-content a {
    color: #0088FF;
    color: var(--link-color);
    text-decoration: unset;
    position: relative;
}
.main-content a:hover {
    text-decoration: underline;
}
#main {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%
}
#navbar { 
    width: 100%;
    font-family: "Do Hyeon", sans-serif;
    z-index: 999;
}
#topbar {
    background: #B78C50;
    background: var(--nav-color);
    height: 35px;
    display: flex;
    align-items: center;
    padding-left: 7px;
}
#bottombar {
    background: #836437;
    background: var(--nav-darkest-color);
    min-height: 34px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    color: #B78C50;
    color: var(--nav-color);
    font-size: 15px;
    flex-wrap: wrap;
}
#bottombar a {
    margin-right: 17px;
    text-transform: uppercase;
    height: 23px;
    display: inline-block;
    margin-top: auto;
    padding: 2px 4px;
    word-wrap: break-word;
    cursor: pointer;
    color: var(--nav-color);
}
#bottombar a.selected {
    border-bottom: 2px solid #CDB18A;
    border-bottom: 2px solid var(--nav-color);
    color: #E0D0BA;
    color: var(--main-color);
    transition: color .3s
}
#logo-container {
    display: flex;
    flex-grow: 1;
}
#rightnav {
    background: #9A733B;
    background: var(--nav-darker-color);
    border-left: 1px solid #836437;
    border-left: 1px solid var(--nav-darkest-color);
    height: 100%;
    display: flex;
    align-items: center;
}
#rightnav a {
    color: var(--main-color);
    text-decoration: unset;
    padding: 0px 12px;
}
#nav-join {
    border-right: 1px solid var(--nav-color);
}
#content {
    position: relative;
    overflow: initial;
    margin: 10px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
}
#content, .main-content {
    height: 100%;
    display: flex;
}
.main-content {
    margin-right: 10px;
    flex-direction: column;
    overflow: hidden;
    overflow-y: auto;
    width: 100%;
    height: 92%;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.main-content::-webkit-scrollbar {
    display: none;
}
#livechat-user-count, #user-count {
    padding-left: 6px;
    vertical-align: super;
    color: #9C9183;
    color: var(--main-darkest-color)
}
#ulist-list, #livechat-ulist-list {
    background: #C4B5A1;
    background: var(--main-darker-color);
    padding: 5px;
    color: #FFF3E3;
    color: var(--input-color);
    margin-top: 4px;
}
#ulist-text img, #livechat-ulist-text img { 
    filter: brightness(0);
    opacity: 0.3;
}
#text-editor, #livechat-text-editor {
    border: 1px solid #C4B5A1;
    border: 1px solid var(--main-darker-color);
    margin-top: 5px;
    display: flex;
    flex-direction: column;
}
#text-editor textarea, #livechat-text-editor textarea {
    border: 0px
}
#text-editor button, #livechat-text-editor button {
    border-radius: 0px;
    border-width: 0px;
    background: var(--nav-darker-color);
    width: 50px;
    color: var(--main-color);
    cursor: pointer
}
#markdown {
    height: 18px;
    background: #DDDDDD;
    background: var(--post-textarea-markdown-color);
    flex-grow: 1;
    height: 100%;
    padding: 0px 2px;
}
#markdown img {
    height: 20px;
    opacity: 0.6;
    padding-top: 2px;
    padding-right: 4px;
}

/* Pages */
#notifications {
    position: absolute;
    min-height: 100%;
    background: #C4B5A1;
    background: var(--main-darker-color);
    width: 315px;
    z-index: 100;
    max-width: 100vw;
    padding-top: 85px;
    cursor: grab
}
#notifications:active {
    cursor: grabbing
}
span.inbox-count {
    border-radius: 37px;
    width: 20px;
    display: inline-block;
    background: #db4139;
    height: 13px;
    vertical-align: text-top;
    margin-left: 2px;
    color: white;
    text-align: center;
    padding-bottom: 3px;
    font-size: small;
}
.timeline { 
    padding: 0px 10px;
    margin-bottom: 11px;
}
.timeline .list .list-item {
    margin-top: 2px;
    background: #E0D0BA;
    background: var(--main-color);
    padding: 7px;
}
.inbox-msg p {
    min-height: 32px;
    font-size: 11px;
    color: black;
    color: var(--main-darkest-color) !important;
}

/* Posts */
.reply-details, .attachment-details {
    margin: 2px auto;
}
#home-posts, #livechat-posts { 
    overflow-y: auto;
    margin-top: 5px;
}
#home-posts .post:last-child, #livechat-posts .post:last-child {
    margin-bottom: 0px;
}
.post {
    display: flex;
    flex-direction: row;
    margin: 0px 0px 2px 0px;
    transition: filter .3s
}
.edit-post {
    display: flex;
    border: 1px solid var(--nav-darker-color);
    margin: 5px 0px;
}
.edit-post textarea {
    width: 100%;
    min-height: inherit;
    margin: 0px;
    border: none;
}
.edit-post button { width: 60px }
.post.highlighted {
    filter: brightness(1.5);
}
.profile-picture {
    background: #FAEDDB;
    background: var(--main-lighter-color);
    padding: 3px;
    margin-right: 2px;
}
.profile-picture img {
    width: 40px;
    height: 40px;
    object-fit: scale-down;
    object-position: center;
}
.post-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: #FAEDDB;
    background: var(--main-lighter-color);
    padding: 8px;
}
.replies {
    margin-bottom: 8px;
    opacity: 0.4;
}

/* Profile pages */
#profile-container, #profile-description {
    padding: 10px;
    margin: 10px;
    background: #00000024;
}
#profile-description {
    flex-grow: 1;
    margin-top: 0px;
}
#user-display { 
    display: flex; 
    flex-direction: column;
    height: 100%; 
}
#profile-container { 
    display: flex; 
    flex-direction: row 
}
#profile-tabs {
    display: flex; 
    flex-direction: column;
    flex-grow: 1
}
.post-message img, .attachment {
    max-width: 100%;
    max-height: 215px;
    transform: translate(0px, -10px);
}
.post-attachments {
    padding: 10px;
    background: #0000000f;
    margin: 3px 0px;
}
.attachment { transform: none }
#profile-image-container img {
    width: 100px;
    height: 100px;
}
#profile-info { padding-left: 10px }
#profile-more-info { margin: 9px 0px }
#profile-more-info, #profile-username {
    font-size: 75%;
}
#profile-display-name {
    font-size: 150%;
}

/* Emoji Picker */
.emoji-picker {
    position: absolute;
    width: 200px;
    height: 125px;
    background: white;
    z-index: 9;
    top: 175px;
    border-radius: 3px;
}
.emoji-picker::before {
    content: "";
    box-shadow: 0 0 2px black;
    position: absolute;
    width: 200px;
    height: 149px;
    top: -24px;
    z-index: -1;
}
.emoji-catgeories {
    width: 100%;
    height: 25px;
    background: #e5e5e5;
    border-bottom: 1px solid #bfbfbf;
    top: -24px;
    position: absolute;
    border-radius: 0px 2px;
    display: flex;
}
.emoji-category {
    height: 100%;
    border-right: 1px solid #bfbfbf;
    display: flex;
    flex-grow: 1;
}
.emoji-category.selected {
    background-color: #bfbfbf;
}
.emoji-catgeories .emoji-category:last-child {
    border: none
}
.emoji-body {
    height: 100%;
    box-sizing: border-box;
    overflow: auto;
    scrollbar-width: none;
}
.emoji-item {
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    padding: 10px 0px;
    max-height: 21px;
    width: 40px;
    height: 40px;
    display: block;
    float: left;
}
.emoji-item:hover {
    background: #dadada
}