* {
  -webkit-touch-callout: none;
    -webkit-user-select: none;
     -khtml-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}

html {
    min-height: 100%;
}

body {
    text-align: center;
    height: 90vh;
    line-height: 90vh;
    background-color: #28333B;
}

body > div {
    display: inline-block;
    vertical-align: middle;
    line-height: normal;
}

#opening {
    width: 70vw;
    margin: 0 auto;
    height: 29vw;
    white-space: nowrap;
    overflow-x: hidden;
    position: relative;
}

#opening-inner, #shadow, #background, #indicator, #glare {
    position: absolute;
    transform: translate3d(0,0,0);
    -webkit-transform: translate3d(0,0,0);
}

#indicator {
    width: 100%;
    height: 100%;
    text-align: center;
    z-index: 7;
    overflow: hidden;
}

#indicator img {
    display: inline-block;
    height: 100%;
}

#opening-inner {
    will-change: transform;
    z-index: 5;
    padding: 3.5% 0;
    background-size: cover;
}

#glare {
    width: 100%;
    height: 100%;
    z-index: 10;
    background-image: url('../spinnerbg2.png');
    background-size: cover;
}

#shadow {
    width: 100%;
    height: 100%;
    z-index: 9;
    background-image: url('../vignette.png');
    background-size: cover;
}

#background {
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: url('../spinnerbg.png');
    background-size: cover;
}

div.card img {
    height: 23vw;
    width: auto;
    min-height: 100px;
}

div.card {
    display: inline-block;
    margin: 0;
}

div.card.selected {
    background: yellow;
    border-radius: 2em;
    transition: 1s;
}

#win {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    opacity: 0;
    background: rgba(0,0,0,0.8);
}

#win.show {
    opacity: 1;

    transition: 1s;
}

#win #zoom-container {
    transform: scale(.8);
}

#win.show #zoom-container {
    transform: scale(1);

    transition: 1s;
}

#popup {
    width: 60vmin;
    height: 60vmin;
    margin: 10vmin auto;
}

#popup-bg {
    position: absolute;
    left: 0;
    top: 0;
    background: white;
    border-radius: 100em;
    width: 100%;
    height: 100%;
}

#popup-bg.rare {
    background: url('../holo.png');
}

#popup img {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    transform: rotate3d(0, 0, 0, 0);
}

#win.show #popup > img {
    animation: rotate2 3.5s linear infinite
    -moz-animation: rotate2 3.5s linear infinite;
    -webkit-animation: rotate2 3.5s infinite;
    -o-animation: rotate2 3.5s linear infinite;
}

#win.show #popup {
    animation: rotate 3.5s linear infinite
    -moz-animation: rotate 3.5s linear infinite;
    -webkit-animation: rotate 3.5s infinite;
    -o-animation: rotate 3.5s linear infinite;
}

#landscape, #loading {
    position: absolute;
    z-index: 999999;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: #28333B;
    color: white;
    text-shadow: 0 0 .2em;
    font-family: 'Arial', sans-serif;
    font-size: 10vmin;
    font-weight: 900;
    text-align: center;
    line-height: 90vh;
}

#loading {
    z-index: 999998 !important;
}

#landscape span, #loading span {
    display: inline-block;
    vertical-align: middle;
    line-height: normal;
}

#vignette {
    position: absolute;
    z-index: 1000000;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    box-shadow: 0 0 4em 0 inset;
    pointer-events: none;
}

audio {
    display: none;
}

@media (orientation: landscape) {
    #landscape {
        display: none;
    }
}

@keyframes rotate {
    0% { transform: rotate3d(0, 1, 0.5, 0deg); }
    40% { transform: rotate3d(0.2, 1, 0.7, 60deg); }
    80% { transform: rotate3d(-0.3, 0.5, 0.6, -40deg); }
    90% { transform: rotate3d(0, 1, 0, 180deg); }
}

@keyframes rotate2 {
    0% { opacity: 1; }
    40% { opacity: 0.7; }
    55% { opacity: 1.0; }
    82% { opacity: 0.9; }
    83% { opacity: 0; }
    93% { opacity: 0; }
    94% { opacity: 0.6; }
}

@-moz-keyframes rotate {
    0% { transform: rotate3d(0, 1, 0.5, 0deg); }
    40% { transform: rotate3d(0.2, 1, 0.7, 60deg); }
    80% { transform: rotate3d(-0.3, 0.5, 0.6, -40deg); }
    90% { transform: rotate3d(0, 1, 0, 180deg); }
}

@-moz-keyframes rotate2 {
    0% { opacity: 1; }
    40% { opacity: 0.7; }
    55% { opacity: 1.0; }
    82% { opacity: 0.9; }
    83% { opacity: 0; }
    93% { opacity: 0; }
    94% { opacity: 0.6; }
}

@-webkit-keyframes rotate {
    0% { transform: rotate3d(0, 1, 0.5, 0deg); }
    40% { transform: rotate3d(0.2, 1, 0.7, 60deg); }
    80% { transform: rotate3d(-0.3, 0.5, 0.6, -40deg); }
    90% { transform: rotate3d(0, 1, 0, 180deg); }
}

@-webkit-keyframes rotate2 {
    0% { opacity: 1; }
    40% { opacity: 0.7; }
    55% { opacity: 1.0; }
    82% { opacity: 0.9; }
    83% { opacity: 0; }
    93% { opacity: 0; }
    94% { opacity: 0.6; }
}

@-o-keyframes rotate {
    0% { transform: rotate3d(0, 1, 0.5, 0deg); }
    40% { transform: rotate3d(0.2, 1, 0.7, 60deg); }
    80% { transform: rotate3d(-0.3, 0.5, 0.6, -40deg); }
    90% { transform: rotate3d(0, 1, 0, 180deg); }
}

@-o-keyframes rotate2 {
    0% { opacity: 1; }
    40% { opacity: 0.7; }
    55% { opacity: 1.0; }
    82% { opacity: 0.9; }
    83% { opacity: 0; }
    93% { opacity: 0; }
    94% { opacity: 0.6; }
}

@font-face {
    font-family: Cabin;
    src: url('Cabin-Regular.otf');
    unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

#sticker-name {
    position: absolute;
    font-size: 5vw;
    left: 0;
    right: 0;
    bottom: -30%;
    font-family: 'Cabin', sans-serif;
    font-weight: 700;
    text-shadow: 0 0 .2em;
    color: #fff;
    font-variant: small-caps;
}

#sticker-name.rare {
    color: #fd6;
}

#sticker-name.rare.rot {
    transform: rotate(90deg);
}

#case-container {
    position: absolute;
    z-index: 50;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: #28333B;
    color: white;
    text-shadow: 0 0 .2em;
    font-family: 'Arial', sans-serif;
    font-size: 4vmin;
    font-weight: 900;
    text-align: center;
    display: flex;
    flex-flow: row wrap;
}

.case {
    display: flex;
    align-content: center;
    align-items: center;
    justify-content: space-around;
    flex: 50%;
}

.case figure {
    width: 20vw;
    height: 20vw;
    margin: 0;
}

.case figure img {
    width: 100%;
}

@media screen and (min-aspect-ratio: 2/1) {
    .case {
        flex: 25%;
    }
}

#loading {
    opacity: 0;
    transition: 0.3s;
    pointer-events: none;
}

#loading.show {
    opacity: 1;
    transition: 0.3s;
}
