.layer-common {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#bg-layer {
    background-image: url(../../images/historyMenu/建築歷史_背景.png);
    background-position: center center;
    background-size: cover;
    z-index: -10000;
    pointer-events: none;
}

/*Back Visual*/

#canvas-container {
    z-index: 0;
}

#visual-back-layer {
    z-index: -1000;
    pointer-events: none;
}

#visual-back-layer .from-year.landscape {
    --xpos: 25%;
    --ypos: 28%;
    --height: 12%;
}

#visual-back-layer .from-year.portrait {
    --xpos: 19%;
    --ypos: 15.7%;
    --width: 9.7%;
}

/*Front Visual*/

#visual-front-layer {
    z-index: 1000;
    pointer-events: none;
}

#visual-front-layer .to-year {
    --xpos-extra: 0%;
    --xpos: calc(60% + var(--xpos-extra));
    --ypos: 56%;
    --height: 14.5%;

    /*portrait*/
    --xpos-extra-portrait: 0%;
    --xpos-portrait: calc(40% + var(--xpos-extra-portrait));
    --ypos-portrait: 51.1%;
    --height-portrait: 6.7%;
}

#visual-front-layer .timeline-display.landscape {
    --xpos: 47%;
    --ypos: 29%;
    --height: 26%;
}

#visual-front-layer .timeline-display.landscape.another {
    --ypos: 24%;
    --height: 31%;
}

#visual-front-layer .timeline-display.portrait {
    --xpos: 31.8%;
    --ypos: 21.7%;
    --height: 27%;
}


/*Front Visual, flat model => 避免model讀取過久的一個手法，用預先渲染圖片直接代替*/
#visual-front-layer .flat-model {
    --xpos: 50%;
    --ypos: 50%;
    --height: 40.2%;
    /*portrait*/
    --ypos-portrait: 65.6%;
    --height-portrait: 28.7%;
}

/*link-button*/
#visual-front-layer .link-button {
    pointer-events: auto;
}

#visual-front-layer .link-button:hover {
    cursor: pointer;
}

#visual-front-layer .link-button.landscape {
    --xpos: 22%;
    --ypos: 64%;
    --height: 7.5%;
}

#visual-front-layer .link-button.portrait {
    --xpos: 29%;
    --ypos: 25.3%;
    --height: 37%;
}

#visual-front-layer .link-button.landscape.instructions {
    --xpos: 50%;
    --ypos: 48%;
    --vert-center: 50%;
    --hori-center: 50%;
    --height: 14.5%;
}


#visual-front-layer .link-button.portrait.instructions {
    --xpos: 50%;
    --ypos: 42%;
    --vert-center: 50%;
    --hori-center: 50%;
}

#visual-front-layer .link-button.link-button-fake {
    /*(svg)專門給點擊建築物方面的*/
    /*background-color: rgba(0, 255, 255, 0.477);*/
    --vert-center: 50%;
    --hori-center: 50%;
    --xpos: 50%;
    --ypos: 50%;
    --height: 35.5%;

    /*portrait*/
    --ypos-portrait: 66%;
    --height-portrait: 25%;
}

/*link-button為裏頭放img的情況下的解決方案*/
#visual-front-layer .link-button.link-button-special {
    height: var(--height);
}

#visual-front-layer .link-button.link-button-special img {
    position: relative;
    display: block;
    height: 100%;
    width: auto;

    /*Anim special*/
    animation-name: link-button-special;
    animation-timing-function: ease-in-out;
    animation-duration: 4s;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

@keyframes link-button-special {

    0%,
    100% {
        transform: scale(1.03);
        opacity: 1;
    }

    50% {
        transform: scale(0.97);
        opacity: 0.7;
    }
}

/*arrow-btn*/

#arrow-btn-layer {
    z-index: 2000;
    pointer-events: none;
}

#arrow-btn-layer .switch-button {
    pointer-events: auto;
    --ypos: 43%;
    --vert-center: 50%;
    --hori-center: 50%;
    --height: 11%;

    /*portrait*/
    --ypos-portrait: 44%;
    --height-portrait: 7%;
}

#arrow-btn-layer .switch-button:hover {
    cursor: pointer;
}

/*instructions-window"*/
#instructions-window.displayBoard {
    background-image: none;
    z-index: 10000;
    --sideBlankFlex: 0.15;
}

#instructions-window.displayBoard .displayWindow {
    display: block;
    border: none;
    background-color: unset;
    height: 75%;
    max-width: 85%;
    padding: 0;
}

#instructions-window.displayBoard .displayWindow .resizer {
    position: relative;
    display: block;
    height: 100%;
    width: auto;
}

#instructions-window.displayBoard .displayWindow::before {
    /*BG*/
    content: "";
    background-image: url(../../images/historyMenu/instructions/底圖.png);
    background-size: 100% 100%;
    position: absolute;
    display: block;
    height: calc(804/766*100%);
    width: 100%;
    top: 0;
    left: 0;
}

#instructions-window.displayBoard .innerContent {
    position: absolute;
    display: flex;
    --borderSpace: 20px;
    top: var(--borderSpace);
    bottom: var(--borderSpace);
    left: var(--borderSpace);
    right: var(--borderSpace);
    flex-direction: row;
}

#instructions-window.displayBoard .innerContent .closeBtn {
    position: absolute;
    display: block;
    height: 10%;
    max-height: 58px;
    min-height: 35px;
    width: auto;
    transform: translate(50%, -50%);
    top: 0;
    right: 0;
}

#instructions-window.displayBoard .side-blank {
    flex: var(--sideBlankFlex);
}

#instructions-window.displayBoard .innerText {
    flex: calc(1 - var(--sideBlankFlex) * 2);
}

#instructions-window.displayBoard .socialLinkPart {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    align-self: flex-end;
}

#instructions-window.displayBoard .socialLinkPart a {
    margin: 2px 5px;
    width: 30%;
    max-width: 46px;
    min-width: 30px;
}


#instructions-window.displayBoard .socialLinkPart a img {
    width: 100%;
    height: auto;
}


#instructions-window.displayBoard .innerText {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: center;
    height: 90%;
}

#instructions-window.displayBoard .innerTextContent {
    position: relative;
    display: block;
    overflow-y: auto;
    overflow-x: hidden;
}

@font-face {
    font-family: "Context-Custom-Font";
    src: url(../../fonts/historyMenu_Sub/ADOBEFANHEITISTD-BOLD.ttf);
}

@font-face {
    font-family: "Header-Custom-Font";
    src: url(../../fonts/historyMenu_Sub/GenSekiGothicTW-Bold.ttf);
}

#instructions-window.displayBoard .innerTextContent {
    /*強制用內鍵字型省流量(標題內文共用)*/
    font-family: Microsoft JhengHei, Arial, Helvetica, sans-serif;
}

body.eng #instructions-window.displayBoard .innerTextContent {
    /*強制用內鍵字型省流量(標題內文共用)*/
    /*因應語言上不同而更改字體(標題內文共用)*/
    font-family: Arial, Helvetica, sans-serif;
}

#instructions-window.displayBoard .innerTextContent h3 {
    /*強制用內鍵字型省流量(標題內文共用)*/
    /*font-family: "Header-Custom-Font";*/
    font-size: 3.5vmin;
    color: #2e3f35;
    font-weight: bold;
    line-height: 1.3;
    letter-spacing: 0.15em;
}

#instructions-window.displayBoard .innerTextContent p {  
    /*強制用內鍵字型省流量(標題內文共用)*/
    /*font-family: "Context-Custom-Font";*/
    color: #5d5d5d;
    font-size: 2.7vmin;
    line-height: 1.5;
    letter-spacing: 0.1em;
    text-align: left;
}

body.eng #instructions-window.displayBoard .innerTextContent p {
    /*因應語言上不同而更改字體*/
    font-family: Arial, Helvetica, sans-serif;
    /*左右對齊*/
    text-align: justify;
}

#instructions-window.displayBoard .innerTextContent h3,
#instructions-window.displayBoard .innerTextContent p {
    padding: 0 5%;
}

#instructions-window.displayBoard .innerTextContent .horizontal-line {
    margin: 6vmin 13px;
}

/*-----------------language variation ENGLISH-----------------*/

body.eng #instructions-window.displayBoard .innerTextContent h3 {
    letter-spacing: normal;
}

body.eng #instructions-window.displayBoard .innerTextContent p {
    letter-spacing: normal;
}

body.eng #visual-front-layer .to-year {
    --height: 12%;

    /*portrait*/
    --height-portrait: 6%;
}

/*-----------------landscape to portrait ratio (<= 1/1)-----------------*/

@media (max-aspect-ratio: 1/1) {
    #bg-layer {
        background-image: url(../../images/historyMenu/mobile/建築歷史（手機）_背景-01.png);
    }

    #instructions-window.displayBoard .displayWindow {
        height: 70%;
        max-width: 90%;
    }

    #instructions-window.displayBoard .innerContent .closeBtn {
        width: 10%;
        max-width: 58px;
        min-width: 35px;
        max-height: unset;
        min-height: unset;
        height: auto;
    }

}