.title-text {
    position: relative;
    margin: 5px 0 0 5px;
    white-space: pre-line;
}
.title-text > .to_other {
    float: right;
    font-size: small;
    font-weight: normal;
}
.title-text > .anchor {
    float: right;
    font-size: small;
    font-weight: normal;
    user-select: none;
    -webkit-user-select: none;
}

.descbox {
    display: flex;
    margin: 5px 0;
    padding: 5px 0;
    max-width: 720px;
    font-size: 16px;
}
.descbox > .line {
    font-size: 16px;
    
}

.talkbox, .diagbox, .endingbox {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    position: relative;
    border-radius: 5px;
    margin: 5px 0;
    padding: 5px 0;
    max-width: 720px;
}
.talkbox {
    background: #a90736;
    color: ivory;
    min-height: 60px;
}
.transbox {
    display: grid;
    grid-template-columns: auto 1fr auto;
    position: relative;
    border-radius: 5px;
    margin: 5px 0;
    padding: 5px 0;
    max-width: 720px;
}
.transbox, .voicebox {
    color: black;
}
.voicebox {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 2px 0;
    border-bottom: 1px solid #aaa;
}

.diagbox {
    background: #444;
    text-align: center;
    color: ivory;
}
.endingbox {
    background: #424047;
    color: ivory;
}
.talkbox > .portrait, .transbox > .portrait, .endingbox > .portrait {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    margin: 0 5px;
    min-width: 64px;
    box-sizing: border-box;
    overflow: visible;
}

.transbox > .portrait {
    height: 100%;
    align-self: stretch;
}

.portrait > .portrait-img {
    height: 64px;
    width: 64px;
    background-size: contain;
}

.portrait > .name {
    position: relative;
    text-align: center;
    font-family: sans-serif;
    word-break: keep-all;
    white-space: nowrap;
    font-size: 0.75rem;
    flex-grow: 1;
}

.transbox .name, .endingbox .name {
    font-size: 0.875rem;
}

.transbox > .portrait > .name:first-child::after {
    content: ':';
}
html[lang|="ja"] .transbox > .portrait > .name:first-child::after {
    content: '：';
}
html[lang|="zh"] .transbox > .portrait > .name:first-child::after {
    content: '：';
}

.talkbox > .line, .transbox > .line, .voicebox > .line, .diagbox > .line, .endingbox > .line {
    align-self: stretch;
    white-space: pre-wrap;
    font-family: sans-serif;
    margin: 0 10px;
}
.transbox > .line {
    font-style: italic;
    font-size: 0.875rem;
}

.voicebox > .line {
    display: grid;
    align-items: center;
    font-size: 0.875rem;
}

.diagbox > .line {
    margin-left: auto;
    margin-right: auto;
}

.line > .icon-img {
    height: 24px;
    width: 24px;
    float: left;
}

.line > p {
    margin: 0;
}

.line > .icon-img + p {
    margin-left: 24px;
}

.voicebox > .line > p {
    margin: 0 5px;
}

.voicebox > .line > p:before {
    content: "(";
}
.voicebox > .line > p:after {
    content: ")";
}

.audio-narr {
    margin-right: 5px;
    height: 40px;
}

.audio-narr > audio {
    margin-left: auto;
    margin-right: auto;
    width: 300px;
    max-width: 100%;
    height: 40px;
}


@media (width <= 720px), (max-width: 720px) {

    .audio-narr {
        background: #a90736;
        border-radius: 5px;
        height: 24px;
        width: 24px;
    }

    .audio-narr::after {
        content: "\01F50A";
    }
    
    .audio-narr > audio {
        display: none;
    }
}
