#container {
    --formatting-syntax: rgba(202, 202, 202, 0.5);
    --formatting-text: rgb(202, 202, 202);
}

#menu_messages {
    --formatting-syntax: rgba(238, 238, 238, 0.5);
    --formatting-text: #eee;
}

#menu_social {
    --formatting-syntax: rgba(255, 255, 255, 0.5);
    --formatting-text: #fff;
}

.content.format {
    white-space: pre;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    overflow-wrap: anywhere;
}

.content.format table,
.content.format thead,
.content.format tbody,
.content.format tr,
.content.format td,
.content.format ul,
.content.format ul>li,
.content.format ol,
.content.format ol>li,
.content.format code,
.content.format details,
.content.format details>p {
    border: none;
    margin: 0;
    padding: 0;
}

.content.format th,
.content.format h1,
.content.format h2,
.content.format h3,
.content.format h4,
.content.format h5,
.content.format h6,
.editable.format th,
.editable.format h1,
.editable.format h2,
.editable.format h3,
.editable.format h4,
.editable.format h5,
.editable.format h6 {
    font-weight: normal;
    margin: 0;
    padding: 0;
}

.editable.format h1,
.editable.format h2,
.editable.format h3,
.editable.format h4,
.editable.format h5,
.editable.format h6 {
    display: inline;
}

.editable.format .h1,
.editable.format h1,
.content.format h1 {
    font-size: 1.6667em;
}

.editable.format .h2,
.editable.format h2,
.content.format h2 {
    font-size: 1.5556em;
}

.editable.format .h3,
.editable.format h3,
.content.format h3 {
    font-size: 1.4444em;
}

.editable.format .h4,
.editable.format h4,
.content.format h4 {
    font-size: 1.3333em;
}

.editable.format .h5,
.editable.format h5,
.content.format h5 {
    font-size: 1.2222em;
}

.editable.format .h6,
.editable.format h6,
.content.format h6 {
    font-size: 1.1111em;
}

.content.format .smallcaps,
.editable.format .smallcaps {
    font-variant: small-caps;
}

.content.format hr {
    border-image-source: linear-gradient(to right, transparent, #666, transparent);
    border-image-slice: 1;
    border-image-width: 1;
}

.editable.format span.labelled>a,
.editable.format a,
.content.format a {
    color: #6666ca;
    text-decoration: underline;
    cursor: pointer;
}

.editable.format a {
    pointer-events: none;
}

.editable.format ul,
.content.format ul {
    list-style-type: initial;
    padding-left: 1.25em;
}

.content.format ol {
    display: table;
    list-style: none;
    counter-reset: item;
    padding-left: 0.5em;
}

.content.format ol>li {
    display: inherit;
    counter-increment: item;
    width: 100%;
}

.editable.format ul>li {
    position: relative;
    display: inherit;
    padding-left: 1.25em;
}

.editable.format ul>li:before {
    content: '';
    display: list-item;
    position: absolute;
    top: 0;
    left: 1.25em;
}

.content.format ol>li:before {
    display: table-cell;
    content: counter(item);
    width: 1em;
    padding-right: 0.25em;
}

.content.format details {
    display: block;
    border: none;
}

.content.format code {
    display: inline-block;
}

.content.format code:empty:before {
    content: "\feff";
}

.editable.format .code,
.editable.format code {
    background-color: black;
}

.editable.format code {
    display: inline;
}

.editable.format .code,
.editable.format code,
.content.format div.code,
.content.format code {
    font-family: "Ubuntu Mono", monospace;
}

.content.format div.code,
.content.format code {
    padding: 0 0.25em;
}

.content.format div.code,
.content.format code {
    border: 1px solid #313131;
    border-radius: 3px;
}

.content.format div.code {
    margin: 0.25em 0;
    padding: 0.25em;
    white-space: pre;
    white-space: pre-wrap;
}

.content.format img {
    max-width: 100%;
}

.content.format table img {
    max-width: none;
}

.content.format details>summary {
    display: list-item;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
}

.content.format details>summary h1,
.content.format details>summary h2,
.content.format details>summary h3,
.content.format details>summary h4,
.content.format details>summary h5,
.content.format details>summary h6 {
    display: inline;
}

.content.format details>summary h1:after,
.content.format details>summary h2:after,
.content.format details>summary h3:after,
.content.format details>summary h4:after,
.content.format details>summary h5:after,
.content.format details>summary h6:after {
    content: "\a";
    white-space: pre;
}

.content.format th,
.content.format td {
    text-align: left;
    padding: 0.25em;
    padding-left: 1em;
}

.content.format th:first-child,
.content.format td:first-child {
    padding-left: 0.25em;
}

.editable.format .thead,
.content.format table:not(.nostyle)>thead {
    font-variant: small-caps;
}

.content.format table:not(.noborder) {
    margin-bottom: 0.25em;
}

.content.format table>*,
.content.format table.middle>* {
    vertical-align: middle;
}

.content.format table.top>* {
    vertical-align: top;
}

.content.format table.bottom>* {
    vertical-align: bottom;
}

.content.format table:not(.noborder)>thead,
.content.format table:not(.noborder)>tbody {
    border-bottom: 2px solid #cacaca;
}

.content.format table:not(.noborder) tr {
    border-top: 1px solid #666;
}

.content.format table:not(.noborder) tr:first-child {
    border-top: none;
}

.content.format table.equalcells {
    table-layout: fixed;
    width: 100%;
}

.content.format table.fillavailable {
    width: 100%;
}

.content.format .ooc,
.editable.format .ooc {
    color: #8c8c8c;
    --formatting-text: #8c8c8c;
}

.editable.format .ooc.start:before {
    content: "(";
}

.editable.format .ooc.end:after {
    content: ")";
}

.editable.format .emote.start:before,
.editable.format .emote.end:after {
    content: "*";
}

.editable.format .say.start:after,
.editable.format .say.end:before {
    content: '"';
}

.content.format .say,
.editable.format .say,
.content.format .emote,
.editable.format .emote,
.editable.format .character>span:before,
.editable.format .character.pure>span:before,
.pure .editable.format .character:not(.sexy):not(.tough):not(.cunning):not(.curious)>span:before,
.content.format a.pure,
.pure.editable.format .say,
.pure .editable.format .say,
.pure .content.format .say,
.pure.editable.format .emote,
.pure .editable.format .emote,
.pure .content.format .emote {
    color: var(--pure);
    --formatting-text: var(--pure);
}

.editable.format .item_link {
    color: #6666ca !important;
}

.curious .editable.format .character:not(.sexy):not(.tough):not(.cunning):not(.pure)>span:before,
.editable.format .character.curious>span:before,
.content.format a.curious,
.curious.editable.format .say,
.curious .editable.format .say,
.curious .content.format .say,
.curious.editable.format .emote,
.curious .editable.format .emote,
.curious .content.format .emote {
    color: var(--curious);
    --formatting-text: var(--curious);
}

.cunning .editable.format .character:not(.sexy):not(.tough):not(.curious):not(.pure)>span:before,
.editable.format .character.cunning>span:before,
.content.format a.cunning,
.cunning.editable.format .say,
.cunning .editable.format .say,
.cunning .content.format .say,
.cunning.editable.format .emote,
.cunning .editable.format .emote,
.cunning .content.format .emote {
    color: var(--cunning);
    --formatting-text: var(--cunning);
}

.sexy .editable.format .character:not(.tough):not(.cunning):not(.curious):not(.pure)>span:before,
.editable.format .character.sexy>span:before,
.content.format a.sexy,
.sexy.editable.format .say,
.sexy .editable.format .say,
.sexy .content.format .say,
.sexy.editable.format .emote,
.sexy .editable.format .emote,
.sexy .content.format .emote {
    color: var(--sexy);
    --formatting-text: var(--sexy);
}

.tough .editable.format .character:not(.sexy):not(.cunning):not(.curious):not(.pure)>span:before,
.editable.format .character.tough>span:before,
.content.format a.tough,
.tough.editable.format .say,
.tough .editable.format .say,
.tough .content.format .say,
.tough.editable.format .emote,
.tough .editable.format .emote,
.tough .content.format .emote {
    color: var(--tough);
    --formatting-text: var(--tough);
}

.editable.format a.image_reference,
.editable.format span.labelled.reference>a.link,
.editable.format span.labelled>em,
.editable.format em {
    font-style: normal;
    font-variant: normal;
    text-decoration: none;
    color: var(--highlight);
}

.editable.format span.image_alt,
.editable.format span.labelled>span.title,
.editable.format span.labelled>a {
    font-variant: normal;
}

.editable.format span.image_alt,
.editable.format span.labelled>span.title {
    color: var(--orange);
}

.editable.format span.image_size,
.editable.format span.image_float,
.editable.format span.table>em,
.editable.format span.command.color>em,
.editable.format>div.reference:before {
    font-variant: all-small-caps;
    color: var(--orange);
}

.editable.format>div.reference:before {
    content: "Reference ";
}

#local_chat .editable span.command,
#local_chat .editable span.insert,
.editable.format .h,
.editable.format .ul,
.editable.format .ol,
.editable.format span.hr,
.editable.format span.br,
.editable.format span.labelled,
.editable.format span.command,
.editable.format span.character,
.editable.format span.insert {
    font-variant: all-small-caps;
    text-decoration: none;
    font-weight: normal;
    color: var(--formatting-syntax);
}

.editable.format .b {
    font-weight: bold;
}

.editable.format .u {
    text-decoration: underline;
}

.editable.format .s {
    text-decoration: line-through;
}

.editable.format .i {
    font-style: italic;
}

.editable.format span.pattern:not(.emote)>span:not(:nth-child(2)) {
    color: var(--formatting-syntax);
}

#local_chat .editable span.insert>span:before,
#local_chat .editable span.size:after,
.editable.format span.insert>span:before,
.editable.format span.size:after {
    content: attr(data-insert);
    font-variant: normal;
    color: var(--formatting-text);
}

#local_chat .editable span.character>span:before,
.editable.format span.character>span:before {
    content: attr(data-name);
    font-variant: normal;
    color: var(--formatting-text);
}

.content.format a.character:empty:before {
    content: "<Not found>";
}

#local_chat .editable span.insert>span:before,
#local_chat .editable span.size:after,
.editable.format span.insert>span:before,
.editable.format span.size:after {
    content: attr(data-insert);
    font-variant: normal;
    color: var(--formatting-text);
}

.editable.format .ul,
.editable.format .ol {
    padding-left: 0.5em;
}

.editable.format .ul:before,
.editable.format .ol:before {
    display: inline-block;
    content: attr(data-index);
    width: 1em;
    padding-right: 0.25em;
    font-variant: normal;
    color: var(--formatting-text);
}

.editable.format .ul:before {
    content: '•';
    text-align: center;
}

#menu_social .content.format hr,
#menu_messages .content.format hr {
    border-image-source: linear-gradient(to right, transparent, var(--formatting-syntax), transparent);
}

#menu_messages .editable.format span.labelled>a,
#menu_messages .editable.format a,
#menu_messages .content.format a {
    color: #6666ee;
}

#menu_social .editable.format span.labelled>a,
#menu_social .editable.format a,
#menu_social .content.format a {
    color: #6666ff;
}

#menu_social .content.format thead,
#menu_social table>tbody,
#menu_messages .content.format thead,
#menu_messages table>tbody {
    border-color: var(--formatting-text);
}

#menu_social .content.format table tr,
#menu_messages .content.format table tr {
    border-color: var(--formatting-syntax);
}

#menu_messages .content.format div.code,
#menu_messages .content.format code {
    background-color: rgba(0, 0, 0, 0.5);
    border-color: #000;
}

.content.format .color a,
.content.format .color a.pure,
.content.format .color a.curious,
.content.format .color a.cunning,
.content.format .color a.sexy,
.content.format .color a.tough,
.content.format .color .ooc,
.content.format .color .say,
.content.format .color .emote,
.pure .content.format .color .say,
.pure .content.format .color .emote,
.curious .content.format .color .say,
.curious .content.format .color .emote,
.sexy .content.format .color .say,
.sexy .content.format .color .emote,
.tough .content.format .color .say,
.tough .content.format .color .emote,
#menu_social .content.format .color a,
#menu_social .content.format .color .say a {
    color: inherit;
}

.content.format .linked_item {
    display: inline-block;
}

.content.format .linked_item>.item_link {
    display: none;
}

.embedded_item:not(.ready) {
    visibility: hidden !important;
}

.embedded_item {
    display: inline-block !important;
    font-size: 25.6px !important;
    width: 2.2em;
    height: 2.2em;
    background: transparent none no-repeat center center;
    background-size: 100% auto;
    color: #fff;
    vertical-align: top;
    font-family: 'Merienda', cursive;
    text-align: left;
    text-shadow: #000 0 1px 0, #000 1px 0 0, #000 0 -1px 0, #000 -1px 0 0;
    pointer-events: auto;
    user-select: none;
    cursor: default;
}

.embedded_item.x2 {
    font-size: calc(25.6px * 2) !important;
}

.embedded_item.item_2x1,
.embedded_item.item_2x2,
.embedded_item.item_2x3 {
    width: 4.4em;
}

.embedded_item.item_1x2,
.embedded_item.item_2x2 {
    height: 4.4em;
}

.embedded_item.item_1x3,
.embedded_item.item_2x3 {
    height: 6.6em;
}

.embedded_item>div {
    padding: 0.1em;
    font-size: 0.7em;
    line-height: 90%;
    pointer-events: none;
}