.home-page-link {
    padding: 8px;
    padding-bottom: 0;
    width: max-content;
    display: block;
    color: black;
    flex: 0 1 auto;
    position: absolute;
}

body.diary {
    margin: 0;
    background: black;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.diary.diary-bg {
    z-index: -1;
    background-size: cover;
}

.diary.bg-desk {
    background-image: url('images/desk.gif');
}

.diary.bg-paper {
    background-image: url('images/paper.jpg');
}

.diary.bg-paper .centerlogocontainer {
    filter: grayscale();
}

.diary.bg-paper .centerlogocontainer:hover {
    filter: grayscale() drop-shadow(0 0.0rem 0.25rem rgba(0, 0, 0, 0.4));
}

body.diary .wrap {
    display: flex;
    flex-flow: column;
    height: 100%;
  }

body.diary .main {
    background: none;
    border: none;
    display: flex;
    flex-flow: column;
    flex: 1 1 auto;
    overflow-y: auto;
}

.scroll-container, .dialog-layout {
    display: flex;
    flex-flow: column;
    height: 100%;
}

.dialog-layout {
    overflow: hidden;
}

.scroll-container {
    justify-content: center;
}

.feature {
    display: flex;
    flex-flow: column;
    flex: 1 1 auto;
    overflow-y: auto;
    justify-content: center;
    align-items: center;
    padding: 8px;
}

.feature-image-wrap {
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    text-align: center;
}

.feature-image {
    max-width: 100%;
    max-height: 100%;  
}

.dialog-layout .dialog {
    flex: 0 1 100px;
    display: flex;
    flex-direction: column;
    width: calc(100% - 16px);
    margin: 8px;
    height: 100px;
    flex-shrink: 0;
    margin-top: 40px;
    overflow: auto;
}

.dialog-top, .dialog-mid, .dialog-bottom {
    display: flex;
}

.dialog-mid {
    flex: 1 1 auto;
    height: 70px;
}

.dialog-top > img:nth-of-type(1), .dialog-bottom > img:nth-of-type(1) {
    flex: 0 1 auto;
    width: 15px;
    height: 15px;
}

.dialog-top img:nth-of-type(2), .dialog-bottom > img:nth-of-type(2) {
    flex: 1 1 auto;
    width: 100%;
    height: 15px;
}

.dialog-top img:nth-of-type(3), .dialog-bottom > img:nth-of-type(3) {
    flex: 0 1 15px;
    width: 15px;
    height: 15px;
}

.dialog-mid > img:first-child, .dialog-mid > img:last-child, .dialog-nav > img, .top-nav img {
    width: 15px;
    flex-shrink: 0;
}

.dialog-content {
    background: white;
    width: 100%;
    overflow: auto;
}

.dialog-inner-content {
    display: inline-block;
    vertical-align: top;
}

.dialog-nav.dialog-next {
    vertical-align: bottom;
}

.dialog-big-nav a:nth-child(1) img, .dialog-big-nav a:last-child img {
    height: 70px;
    width: unset;
    float: left;
}

.dialog-big-nav a:last-child img {
    float: right;
}

.dialog-big-nav > .dialog-nav {
    max-height: 70px;
    float: left;
    overflow: hidden;
}

.dialog-big-nav > .dialog-nav.dialog-next {
    float: right;
}

.dialog-stood-out {
    padding: 1.75em 2em 0 1em;
    display: inline-block;
    vertical-align: top;
}

.top-nav {
    display: flex;
    flex-direction: row;
    height: 2em;
    font-size: 1.5em;
    justify-content: space-evenly;
    margin-top: 8px;
}

.top-nav a {
    text-decoration: none;
    border: 4px ridge #fff;
    padding: 8px;
}

.top-nav a:hover {
    background-color: aquamarine;
    /* border-style: outset; */
}

.diary:not(.diary-dialog) .wrap {
    overflow: auto;
}

.diary:not(.diary-dialog) .main {
    overflow: unset;
}

@media(max-width:1200px) {
    .top-nav, .dialog-layout {
        margin-top: 76px; /* 8px above logo + 60px logo + 8px of the usual margin */
    }
}

@media(max-width:640px) {
    .top-nav > a > span {
        display: none;
    }
}

@media(min-width:1000px) {
    .padding-top-1-2-unless-mobile {
        /* Used for two-choice buttons in dialog */
        padding-top: 1.2em;
    }
}