body {
    /*
    font-family: 'Brill', serif;
    color: black;
    max-width: 800px;
    margin: 0 auto;
    padding-top: 20px;
    font-size: 1.5em;
    line-height: 1;
    */
    hyphens: auto;
    display: flex;
    flex-direction: row-reverse;
    padding: 0;
    margin: 0;
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    font-variant-ligatures: none;
}

#recordcontainer, .recordcontainer {
    overflow-x: hidden;
    overflow-y: scroll;
    width: 100%;
    padding-left: 0;
    flex: 50%;
    position: relative;
    margin-left: auto;
    margin-right: auto;
}

#record-thin, .record-thin {
    position: relative;
    /*padding-left: 12.5%;*/
    /*width: 120%;*/
    padding-left: 3.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

#record-fat, .record-fat {
    position: relative;
    /*padding-left: 12.5%;
    width: 87.5%;*/
    padding-left: 3.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

#record-thin h1, .record-thin h1 {
    /*max-width: 55%;*/
    /*max-width: 550px;
    width: 87.5%;*/
}
.teitext {
    width: 87.5%;
    font-size: 1.4rem;
}
#record-thin .teitext {
    width: unset;
    max-width: 800px;
    padding-right: 2rem;
}
.teitext p:not(.diplo) {
    max-width: 70ch;
}

#viewer {
    position: relative;
    flex: 50%;
    min-width: 50vw;
    max-width: 100vw;
    height: 100vh;
    border: 0;
}

#viewer .fullscreen {
    position: relative;
    height: 100%;
}

#topbar {
    position: sticky;
    height: 0;
    top: 1em;
    left: 1em;
    display: flex;
    width: 100%;
    flex-direction: row;
}

#buttoncontainer {
    position: absolute;
    top: 0;
    left: -2.8em;
    font-size: 1em;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(2px);
}

#buttoncontainer > div {
    background: rgb(255,255,248);
}

#transbutton {
    display: none;
    border: 1px solid black;
    padding: 0.1rem 0.5rem 0.1rem 0.5rem;
    height: 36px;
    width: 34px;
    box-sizing: border-box;
    flex-shrink: 0;
    font-size: 1.5rem;
    cursor: default;
}

@media (max-width: 800px) {
    html {
        font-size: 12px;
    }
    #buttoncontainer {
        font-size: 1.17rem;
    }
}

#transbutton:lang(en) {
    padding: 0.2em 0 0 0.43em;
    font-size: 1.5em;
}

#transbutton:lang(ta-Taml) {
    padding: 0.2em 0 0 0.4em;
    font-size: 1em;
}

#transbutton:lang(sa-Gran) {
    padding: 0.5em 0 0 0.5em;
    font-size: 1.2em;
    line-height: 1;
}

#transbutton:lang(sa-Deva) {
    padding: 0.1em 0 0 0.4em;
    font-size: 1.4em;
}

#transbutton:lang(sa-Beng) {
    padding: 0.1em 0 0 0.4em;
    font-size: 1.4em;
}

#transbutton:lang(sa-Telu) {
    padding: 0.2em 0 0 0.3em;
    font-size: 1.6em;
    line-height: 1;
}

#transbutton:lang(sa-Nand) {
    font-size: 1.2em;
    padding: 0.3em 0 0 0.5em;
}

#transbutton:lang(sa-Newa) {
    font-size: 1.3em;
    padding: 0 0 0 0.5em;
}

#transbutton:lang(sa-Shrd) {
    padding: 0.2em 0 0 0.45em;
    font-size: 1.4em;
}

#transbutton:lang(sa-Mlym) {
    padding: 0.4em 0 0 0.4em;
    font-size: 1.1em;
}

#transbutton:lang(sa-Tibt) {
    padding: 0.3em 0 0 0.35em;
    line-height: 1.5em;
}
#transbutton:hover {
    background: #ff9900;
    border: 1px solid #ff9900;
}

.line-view-icon {
    margin-right: 0.5rem;
    cursor: default;
}

.line-view-icon:hover svg {
    background: #ff9900;
}

section.mspart {
    padding-left: 2em;
    background: rgba(230,230,230,0.5);
}

section > div.lg {
    margin-left: 1rem;
}

section > table {
    /*max-width: 55%;*/
    border-spacing: 0 1rem;
}

th {
    vertical-align: baseline;
    font-size: 1rem;
    line-height: 2rem;
    padding-right: 1.5rem;
    hyphens: none;
    width: min-content;
}

th.left-align {
    text-align: left;
    writing-mode: horizontal-tb;
    position: initial;
    padding-top: 0;
}

thead th {
    font-size: 1.4rem;
}

td {
    font-size: 1.4rem;
    line-height: 140%;
    word-break: break-word;
}

td p:first-child {
    margin-top: 0;
}

ul ul {
    margin-left: 1rem;
}

div.para {width:100%;
          text-align: justify;
          padding: 1% 0 2% 0;
}

/*
div.devanagari {font-size: 1.1em !important;
              line-height: 150%;
}

span.devanagari {font-size: 1em !important;
}

p.devanagari {font-size: 1.2em !important;
}

div.malayalam {font-size: 1.2em !important;
}
span.malayalam {font-size: 1.1em !important;
}
p.malayalam {font-size: 1.3em !important;
}

div.telugu {font-size: 1.2em !important;
          line-height: 150%;
          word-spacing: 103%;
}
span.telugu {font-size: 1.1em !important;
             line-height: 120%;
}
p.telugu {font-size: 1.3em !important;
}

.balinese {font-size: 1.1em !important;
           line-height: 200%;
}
*/
span.spacer {display: none;
             white-space: pre-wrap; /* when the highlight function splits a spacer node, sometimes the whitespace gets collapsed */
}
/*
:lang(sa) {
    font-family: Brill, PedanticDevanagari, PedanticMalayalam, PedanticTelugu, Tantular Bali, serif;
}
*/
/*
div.teitext {
    border: 0;
    padding: 0 4% 0 0;
    vertical-align:top;
    font-size: 1.1em;
    line-height:135%;
    top: 2em;
}
*/
.texttitle td {
    font-size: 2rem;
}

h2, h3, h4, .editionStmt,
section > p, section > div.lg, section > table {
    max-width: 800px;
    width: 87.5%;
}

#record-fat section > table.texttitle, #record-thin section > table.texttitle {
    max-width: 100%;
    width: 100%;
    top: 0;
    padding-bottom: 1rem;
    position: sticky;
    z-index: 2;
    backdrop-filter: blur(2px);
    background: linear-gradient(rgb(255,255,248) 60%, rgba(255,255,255,0));
}

#record-fat section > div.para.wide, #record-fat section > div.lg.wide {
    max-width: 100%;
    width: 87.5%;
    padding-left: 0;
    margin-left: 1rem;
}
/*
#record-thin h2, #record-thin h3, #record-thin h4, #record-thin .editionStmt,
#record-thin section > p, #record-thin section > div.lg, #record-thin section > table,
.record-thin h2, .record-thin h3, .record-thin h4, .record-thin .editionStmt,
.record-thin section > p, .record-thin section > div.lg, .record-thin section > table {
    /*max-width: 55%;*/
    max-width: 800px;
    width: 87.5%;
}
*/
span.type {
    padding-right: 1em;
    font-variant: small-caps;
}
/*
.teitext {
    width: inherit;
}
*/
.off {
    display: none;
}

.mirador-osd-info {
    padding-bottom: 8px !important;
}

#tooltip {
    display: block;
    position: fixed;
    background: rgba(17,17,17,0.8);
    border-radius: 4px;
    color: #fff;
    font-style: normal;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: normal;
    line-height: normal;
    vertical-align: middle;
    padding: 0.5em 1em;
    margin-bottom: 11px;
    max-width: 300px;
    z-index: 10;
}

#tooltip hr {
    border: 0;
    margin-bottom: 3px;
    margin-top: 3px;
    height: 1px;
    background-image: linear-gradient(to right, rgba(255,255,255,0),rgba(255,255,255,0.75),rgba(255,255,255,0));
}

blockquote {
    margin-top: 0;
}

p blockquote {
    margin-top: 0.5em;
}

.blockquote {
    display: block;
    margin: 0.5em;
}

a.uri {
    word-break: break-word;
}

hr {
    width: 87.5%;
}
#record-thin hr {
    width: unset;
    margin-right: 2rem;
    max-width: 800px;
}

@media (max-width: 800px) {
    th {
        writing-mode: vertical-lr;
        position: sticky;
        top: 0;
        padding-top: 1rem;
        background: rgb(255,255,248);
    }
}

@media (max-width: 600px) {
    body {
        flex-direction: column;
    }
    /*
    #record-thin .teitext {
        width: 95%;
    }
    */
    ul {
        list-style-type: none;
    }
}
