html {
    font-family:'メイリオ',Meiryo,helvetica,sans-serif;
}

body {
    margin: 0;
    word-wrap: break-word;
}

.main.standard {
    font-size: calc((100vh - 175px) * 1.33 / 60);
    padding-right: 10px;
}
.main.large {
    font-size: calc((100vh - 175px) * 1.33 / 55);
}
.main.xlarge {
    font-size: calc((100vh - 175px) * 1.33 / 50);
}

ul {
    margin: 0;
}

li:not(:last-child) {
    margin-bottom: 0.3rem;
}

/* overall grid */
.grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-rows: -webkit-min-content 3px auto 3px -webkit-min-content;
    -ms-grid-rows: min-content 3px auto 3px min-content;
    grid-template-rows: -webkit-min-content auto -webkit-min-content;
    grid-template-rows: min-content auto min-content;
    -ms-grid-columns: 400px 0px minmax(10px, 1fr) 0px minmax(calc(768px - 400px), calc((100vh - 175px) * 1.33)) 0px 3fr;
    grid-template-columns: 400px minmax(10px, 1fr) minmax(calc(768px - 400px), calc((100vh - 175px) * 1.33)) 3fr;
        grid-template-areas:
        "header header      header header"
        "menu   left-margin main   right-margin"
        "footer footer      footer footer";
    grid-gap: 3px 0px;
    min-height: 100vh;
}

@media screen and (max-width: 768px) {
.grid {
        -ms-grid-rows: -webkit-min-content 3px -webkit-min-content 3px auto 3px -webkit-min-content;
        -ms-grid-rows: min-content 3px min-content 3px auto 3px min-content;
        grid-template-rows: -webkit-min-content -webkit-min-content auto -webkit-min-content;
        grid-template-rows: min-content min-content auto min-content;
        -ms-grid-columns: minmax(10px, 1fr) 0px minmax(600px, calc((100vh - 175px) * 1.33)) 0px 1fr;
        grid-template-columns:  minmax(10px, 1fr) minmax(600px, calc((100vh - 175px) * 1.33)) 3fr;
            grid-template-areas:
            "header      header header"
            "menu        menu   menu"
            "left-margin main   right-margin"
            "footer      footer footer";
    }
}

.header {
    -ms-grid-row: 1;
    -ms-grid-column: 1;
    -ms-grid-column-span: 7;
    grid-area: header;
}
.menu {
    -ms-grid-row: 3;
    -ms-grid-column: 1;
    grid-area: menu;
    padding: 0 10px;
    font-size: 0.9rem;
    border-right:1px #ddd solid;
}
.main {
    -ms-grid-row: 3;
    -ms-grid-column: 5;
    grid-area: main;
    height: 100%;
    min-height: calc((100vh - 175px)); /* For IE */
    overflow: hidden; /* For IE: Prevent horizontal scroll when translateX/Y is used. */
}
.footer {
    -ms-grid-row: 5;
    -ms-grid-column: 1;
    -ms-grid-column-span: 7;
    grid-area: footer;
}
.left-margin {
    -ms-grid-row: 3;
    -ms-grid-column: 3;
    grid-area: left-margin;
}
.right-margin {
    -ms-grid-row: 3;
    -ms-grid-column: 7;
    grid-area: right-margin;
}
@media screen and (max-width: 768px) {
    .header {
        -ms-grid-row: 1;
        -ms-grid-column: 1;
        -ms-grid-column-span: 5;
    }
    .menu {
        -ms-grid-row: 3;
        -ms-grid-column: 1;
        -ms-grid-column-span: 5;
    }
    .main {
        -ms-grid-row: 5;
        -ms-grid-column: 3;
    }
    .footer {
        -ms-grid-row: 7;
        -ms-grid-column: 1;
        -ms-grid-column-span: 5;
    }
    .left-margin {
        -ms-grid-row: 5;
        -ms-grid-column: 1;
    }
    .right-margin {
        -ms-grid-row: 5;
        -ms-grid-column: 5;
    }
}

.main img {
    /* Prevent image boundary overlap: 100% -> 99% */
    max-width: 99%;
    max-height: 99%;
}

/* title */
.title {
    margin: 12px 0px;
    border-bottom: 6px solid;
    border-image: linear-gradient(to right, #0170c0 0%, #cee1f2 100%);
    border-image-slice: 1;
    border-bottom-width: thick;
    font-weight: bold;
    font-size: 1.2rem;
}

/* abstract */
.abstract {
    padding-bottom: 12px;
}
.abstract-inner {
    padding: 10px 5px;
    background-color: #f8f8f8;
    border: 3px #0c8475 solid;
    border-radius: 5px;
    font-weight: bold;
}
.abstract-inner ul {
    margin: 0;
}
.subtitle {
    margin: 0 0 0 10px;
    color: #0c8475;
    font-size: 1.2rem;
}
.subtitle:before {
    padding-right: 0.5rem;
    font-family:'Font Awesome 5 Free';
    content: "\f45c";
    font-size: 0.5rem;
    vertical-align: 0.2rem;
}

/* menu */
.leftmenu {
    background-color:#fff;
    clear: none;
    text-align: left;
    font-size: 100%;
    border-top-color: #666;
    border-right-color: #666;
    border-bottom-color: #666;
    border-left-color: #666;
    margin-top: 10px;
    margin-right: 0px;
    margin-bottom: 5px;
    margin-left: 0px;
    padding: 0px;

    height: calc(100vh - 175px);
    overflow: auto;

    position: relative;
}

@media screen and (max-width: 768px) {
    .leftmenu {
        height: auto;
        overflow: visible;
    }
}

.menu-select {
    margin: 3px;
}

.font-select {
    float: right;
    position: absolute;
    top: 3px;
    right: 3px;
}
.font-buttons>div {
    display: table-cell;
    width:30px;
    background-color: #f8f8f8;
    border:1px #dcdcdc solid;
    text-align:center;
    vertical-align: middle;
}
.font-buttons>div.selected {
    background: #e2e2e2;
}
.font-buttons>div:hover {
    cursor: pointer;
    background: #dcdcdc;
}
.font-buttons>div:first-child {
    border-radius: 2px 0 0 2px;
}
.font-buttons>div:last-child {
    border-radius: 0 2px 2px 0;
}
.font-standard {
    font-size: 10px;
}
.font-large {
    font-size: 11px;
}
.font-xlarge {
    font-size: 12px;
}

/* navigator grid */
.nav-grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-rows: auto;
    grid-template-rows: auto;
    -ms-grid-columns: 1fr 10px 1fr;
    grid-template-columns: repeat(2, 1fr);
        grid-template-areas:
        "previous next";
    grid-gap: 0px 10px;
}
.nav-grid>div:nth-child(1) {
    -ms-grid-row: 1;
    -ms-grid-column: 1;
    grid-area: previous;
}
.nav-grid>div:nth-child(2) {
    -ms-grid-row: 1;
    -ms-grid-column: 3;
    grid-area: next;
}
.nav-grid>div:nth-child(1)>a {
    margin-left: auto;
}
.nav-grid>div:nth-child(2)>a {
    margin-right: auto;
}

/* navigator */
.nav-grid {
    text-align: center;
    padding: 12px 0px;
}
.nav-grid>div>a {
    min-width: 50%;
    width: -webkit-max-content;
    width: -moz-max-content;
    width: max-content;
    padding: 10px 30px;
    border-radius: 100px;
    color: #0066cc;
    background-color: #f8f8f8;
    border:1px #dcdcdc solid;
    display: block;
    text-decoration: none;
}
.nav-grid>div a:hover {
    background: #dcdcdc;
}

/* image size */
.img-center {
    position: relative;
}
.img-center>img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateY(-50%) translateX(-50%);
}

.img-top-center {
    position: relative;
}
.img-top-center>img {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.img-lefter {
    position: relative;
}
.img-lefter>img {
    position: absolute;
    top: 50%;
    left: 25%;
    transform: translateY(-50%) translateX(-25%);
}

.img-lefter-w-title {
    position: relative;
}
.img-lefter-w-title>img {
    position: absolute;
    bottom: 0%;
    left: 25%;
    transform: translateY(0%) translateX(-25%);
    max-height: calc(99% - 1.2rem);
}

.img-center-w-siblings {
    display: flex;
    align-items: center;
}
.img-center-w-siblings>div {
    width: 100%; /* For IE */
}
.img-center-w-siblings>div>img {
    width: 100vw; /* Capped by global max-width settings. */
}

/* misc */
.clickable:hover {
    cursor: pointer;
    outline: solid 1px #0000ff;
    outline-offset: -1px;
}

dl.horizontal>dt {
  float: left;
}
dl.horizontal>dt::after {
    content:":";
}
dl.horizontal>dd {
  margin-left: 3rem;
}
dl.footnote>dt.single+dd {
  margin-left: 2rem;
}

.figure-title {
    color: #FFA500;
    font-weight: bold;
}
.figure-title::before {
    font-family:'Font Awesome 5 Free';
    content: "\f0da";
}

.footnote {
    font-size: 0.8rem;
    word-break: break-all;
}

.text-center {
    text-align: center;
}

.strong {
    color: #FF3FBF;
}

/* glossary page specific */
.glossary-item {
    margin: 1rem 0 0 0.5rem;
    color: #0070c0;
    font-weight: bold;
}
.glossary-item:first-child {
    margin-top: 0;
}
.glossary-item::before {
    padding-right: 0.5rem;
    font-family:'Font Awesome 5 Free';
    content: "\f45c";
    font-size: 0.5rem;
    vertical-align: 0.2rem;
}

.glossary-figure-title {
    color: #0070c0;
    font-weight: bold;
}

.glossary-tbl {
    width: 100%;
    border-collapse: collapse;
    margin: 20px auto 40px;
}
.glossary-tbl td {
    padding: 5px 10px;
    border:1px #ddd solid;
}
.glossary-tbl th {
    padding: 5px 10px;
    border: 1px #ddd solid;

}
.glossary-tbl th:nth-child(1) {
    width: 20%;
}
.glossary-tbl th:nth-child(2) {
    width: 35%;
}
.glossary-tbl th:nth-child(3) {
    width: 45%;
}

dl.glossary-check {
    margin: 0;
}
dl.glossary-check>dt {
    color: #0070c0;
    float: left;
}
dl.glossary-check>dt::after {
    content:":";
}
dl.glossary-check>dd {
  margin-left: 15rem;
}
dl.glossary-check>dt::before{
    padding-right: 0.5rem;
    font-family:'Font Awesome 5 Free';
    content: "\f00c";
    font-size: 0.5rem;
    vertical-align: 0.2rem;
    font-weight: 600;
}

.glossary-strong {
    color: #0070c0;
}

/* overwrite css to imitate styles in common.css */
#header {
    position: static;
    z-index: auto;
    white-space: nowrap;
}
.logo {
    font-size: 19.2px;
    font-family: 游ゴシック体, 'Yu Gothic', YuGothic, 'ヒラギノ角ゴシック Pro', 'Hiragino Kaku Gothic Pro', メイリオ, Meiryo, Osaka, 'ＭＳ Ｐゴシック', 'MS PGothic', sans-serif;
}

#footer {
    position: static;
    margin-top: 0;
}
#fmenu li {
    float: left;
    font-size: 16px;
    font-family: 游ゴシック体, 'Yu Gothic', YuGothic, 'ヒラギノ角ゴシック Pro', 'Hiragino Kaku Gothic Pro', メイリオ, Meiryo, Osaka, 'ＭＳ Ｐゴシック', 'MS PGothic', sans-serif;
}
.copyright {
    line-height: 100%;
    color: #333;
    font-size: 12px;
    font-family: 游ゴシック体, 'Yu Gothic', YuGothic, 'ヒラギノ角ゴシック Pro', 'Hiragino Kaku Gothic Pro', メイリオ, Meiryo, Osaka, 'ＭＳ Ｐゴシック', 'MS PGothic', sans-serif;
}

