body {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 18px;
    line-height: 130%;

    background: #30183a;
    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0;
}

div {
    box-sizing: border-box;
}

div, p, span {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

.shadow {
    box-shadow: #000000ba 0 3px;
}

#main {
    display: flex;
    flex-direction: column;
    width: 700px;
    position: relative;
    overflow: hidden;
}

#cover-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;

    background-image: url("img/map.png");
    background-position: center;
    background-size: 130%;
    background-position-x: 90%;
    background-position-y: 69%;

    cursor: pointer;
}

h1 {
    font-family: 'Sigmar', sans-serif;
    font-size: 80px;
    line-height: 80px;
    text-shadow: -6px 6px #00000094;
    position: absolute;
    left: 40px;
    top: -30px;

    color: #323778;
    -webkit-text-stroke: white 1.5px;
}

h2 {
    font-size: 24px;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 5px;
    color: white;
    background: #323778;
    font-weight: normal;
    text-align: center;
    padding: 10px;
}

#cover-witch {
    position: absolute;
    bottom: 25px;
    right: 80px;
    width: 250px;
    transition: transform 100ms ease-in-out;
    cursor: pointer;
}
#cover-witch img {
    width: 100%;
    transform: scaleX(-1);
}
#cover-overlay:hover #cover-witch {
    transform: rotate(-5deg);
}

#cover-overlay .letter {
    position:absolute;
    width: 90px;
}
#cover-overlay .letter img {
    width: 100%;
}
#letter1 {
    bottom: 45px;
    left: 210px;
    transform: rotate(-10deg);
}
#letter2 {
    bottom: 5px;
    left: 40px;
    transform: rotate(55deg);
}

#map-container {
    background-image: url("img/map.png");
    background-position: center;
    background-size: 120%;
    background-position-x: 149%;
    background-position-y: 69%;
}

#map {
    width: 460px;
    height: 400px;
    position: relative;
}
#map:not(.active)
{
    opacity: 0;
}

.loc {
    padding: 5px;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    position: absolute;
}

.loc .icon {
    width: 70px;
    height: 70px;
    background: #b0b5f0;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid black;
    position: relative;
    bottom: 10px;
    box-shadow: #0000006b 0 4px;
}

.loc img {
    width: 110px;
    position: relative;
    top: 10px;
}

.loc .name {
    position: absolute;
    top: -22px;
    left: 55px;
    border: 2px solid black;
}

.loc.here .icon, .loc.here .name, .loc.here .label {
    /*border-color: #00000038;*/
}

.loc.flipped {
    flex-direction: row;
}

.loc.flipped .label {
    padding: 5px 33px 5px 10px;
    margin-left: 0;
    margin-right: -25px;
}

.loc.flipped .name {
    left: auto;
    right: 60px;
}

.active#map .loc:not(.here) {
    cursor: pointer;
}
.active#map .loc:not(.here):hover {
    background: #7560a5;
}

#wes {
    left: 15%;
    top: 62%;
}

#gemma {
    right: 5%;
    top: 45%;
}

#sorrel {
    right: 53%;
    top: 32%;
}

#theo {
    left: 38%;
    top: 15%;
}

#lizzie {
    left: 37%;
    top: 79%;
}

#witch {
    width: 160px;
    position: absolute;
    left: -30px;
    top: 253px;
    transform: scaleX(-1);
    pointer-events: none;
    transition: left 1s ease-in-out, top 1s ease-in-out;
}

#witch img {
    width: 100%;
}

#choice-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#choice-container:not(.active) {
    display: none;
}

.choice-wrapper {
    width: 240px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#inventory {
    background: #7560a5;
    display: flex;
    flex-direction: column;
    border: 3px solid black;
    overflow-y: auto;
    flex: 1;
    padding: 20px 0 5px;

    box-shadow: #0000006b 0 4px;
    border-radius: 0 0 25px 25px;
}

.item {
    padding: 5px;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
}

.active .item {
    cursor: pointer;
}
.active .item:hover {
    background: #2d30578f;
}

.icon {
    height: 50px;
    margin: -20px 0 -20px -5px;
    position: relative;
}

.item .icon img {
    height: 100%;
}

.label {
    background: white;
    border-radius: 50px;
    padding: 5px 10px 5px 28px;
    margin-left: -25px;
    line-height: 110%;
    flex: 1;
    border: 2px solid black;
    box-shadow: #0000006b 0 4px;
}

.inventory-header {
    background: #b0b5f0;
    padding: 5px 10px;
    border-radius: 50px;
    border: 3px solid black;
    margin: 10px 0 -15px;
    text-align: center;
    position: relative;
    z-index: 1;
    border-bottom: none;
    /*font-weight: bold;*/
}

.sidebar-header {
    background: #4b3b6f;
    color: white;
    padding: 5px 10px;
    border-left: 3px solid black;
    text-align: center;
    display: none;
}

.button {
    /*background: #ffc259;*/
    background: white;
    padding: 5px 10px;
    border-radius: 50px;
    border: 3px solid black;
    margin: 10px 0;
    /*font-weight: bold;*/
    text-align: center;
    position: relative;
    cursor: pointer;
    box-shadow: #0000006b 0 4px;
}


/* When the inventory isn't being actively shown, it appears as a sidebar. */
#choice-container.sidebar {
    display: block;
    left: auto;
}

#choice-container.sidebar .inventory-header,
#choice-container.sidebar .leave.button {
    display: none;
}

#choice-container.sidebar .sidebar-header {
    display: block;
}

#choice-container.sidebar #inventory {
    border-style: none none none solid;
    padding-top: 5px;
    border-radius: 0;
}

#choice-container.sidebar .item .label {
    border: none;
    margin-top: 2px; margin-bottom: 2px;
}

#dialog-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    /*background: rgba(0, 0, 0, 0.25);*/
}
.portrait {
    height: 360px;
    position: absolute;
    bottom: 0;
    transform-origin: bottom;
}

.portrait.bounce {
    animation: bounce 0.5s ease 0s 1 normal forwards;
}
@keyframes bounce {
    0% {
        transform: scale3d(1, 1, 1);
    }

    30% {
        transform: scale3d(0.99, 1.01, 1);
    }

    100% {
        transform: scale3d(1, 1, 1);
    }
}

#pc-portrait {
    right: 0px;
}

#npc-portrait {
    left: 0px;
}

.dialog-wrapper {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dialog {
    margin: 0 auto;
    width: 280px;
    position: relative;
    margin-left: 150px;
}

.long .dialog {
    width: 350px;
}

.claire .dialog {
    margin-left: auto;
    margin-right: 150px;
}

#name {
    position: absolute;
    bottom: -23px;
    left: 25px;
}

.name {
    border: 3px solid black;
    border-radius: 30px;
    padding: 2px 15px;
    background: gray;
}

.claire #name {
    left: auto;
    right: 25px;
    background: #b0b5f0;
}

.gemma .name {
    background: #ff83a2;
}

.lizzie .name {
    background: #c07de3;
}

.sorrel .name {
    background: #ff624b;
}

.theo .name {
    background: #72a15f;
}

.wes .name {
    background: #ffb051;
}

#text {
    cursor: pointer;
    background: white;
    padding: 10px 30px;
    cursor: pointer;
    border: 3px solid black;
    border-radius: 60px;
    min-height: 40px;
}

#arrow {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 20px;
    cursor: pointer;
}

#dialog-overlay:not(.active) {
    visibility: hidden;
}
