@keyframes fadeOn {
    0% {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes look {
  0% {
    transform: translate(-0.3em, 0);
  }
  50% {
    transform: translate(0, 0) scale(0.8);
  }
  100% {
    transform: translate(0.3em, 0);
  }
}

@keyframes growOn {
    0% {
        transform: scaleX(.3)
    }

    60% {
        transform: scaleX(1.2)
    }

    70% {
        transform: scaleX(.9)
    }

    to {
        transform: scaleX(1)
    }
}

@keyframes getBig {
    0% {
        transform: scale(0.5)
    }

    30% {
        transform: scale(1.3)
    }

    to {
        transform: scale(0.8)
    }
}

@keyframes ellipsis {
    to {
        width: 1.5em
    }
}

@keyframes bg {
    0% {
        background-position-x: 12em
    }

    to {
        background-position-x: 0
    }
}

@keyframes sib {
    0% {
        transform: translateY(1em) scale(0)
    }

    60% {
        transform: translateY(0) scale(.8,1.2)
    }

    80% {
        transform: translateY(0) scale(1.1,.9)
    }

    to {
        transform: translateY(0) scale(1)
    }
}

@keyframes dash {
    0% {
        stroke-dashoffset: 1800
    }

    to {
        stroke-dashoffset: -1800
    }
}

* {
    font-family: Trebuchet MS,sans-serif;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translate3d(0,0,0);
    scrollbar-width: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none
}

body,html {
    height: 100%;
    overflow: hidden;
    text-align: center;
    font-size:3vmin;
    text-rendering: geometricPrecision
}

a {
    color: inherit;
    text-decoration: none
}

.clue span:not(.person),td.cme span:not([data-o='0']):not(.incorrect):not(.correct) {
    padding-bottom: .05em;
    border-bottom: 1px solid rgba(0,0,0,0.23);
    text-shadow: 0 .1em .1em rgb(0 0 0/30%)
}

.lang,.sub-game,.tutorial,button,input,span,.cme {
    border-radius: 0.25em
}

#matrix,#menu,#root,#wb,body,html,input,#hun {
    background: #fff;
    color: #696969
}

.night #matrix,.night #menu,.night #root,.night #wb,.night body,.night html,.night input, .night #hun {
    background: #333;
    color: #fff
}

.night #matrix {
    background: #282828
}

#matrix button.clue:active,.night #matrix button,.night button.clue,button.clue:active {
    box-shadow: 0 0 2px #444;
    transform: translateY(11px)
}

.night .title .bl {
    -webkit-text-stroke: 3px #999
}

#cont {
    height: 100%
}

#cont,#menu,#root {
    display: flex;
    flex-direction: column
}

#matrix {
    background: radial-gradient(circle,#eee 70%,#c4c4c4 100%);
    border-top: none;
    bottom: 0;
    box-shadow: 0 0 114px rgba(0,0,0,.4),0 0 20px rgba(0,0,0,.4);
    display: flex;
    padding: .5em;
    position: fixed;
    width: 100%
}

#matrix table {
    border-collapse: separate;
    border-spacing: .25em;
    table-layout: fixed;
    top: -.25em;
    width: 100%
}

.end #matrix table {
    margin: 0 auto;
    width: 90%
}

.end #matrix table .cme {
    background: 0 0;
    box-shadow: none
}

th {
  font-size: 0.9rem;
    pointer-events: none
}

th.person {
    animation: sib .5s ease both;
    font-size: 3.3rem;
    top: .4em
}

.end th.person span {
    transform: scale(1.5);
    transform-origin: 50% 1.1em;
    transition: .1s ease all
}

th.person span {
    bottom: 0;
    font-size: 6rem;
    margin-left: -.5em;
    position: absolute
}

col {
    width: 7em
}

.mrow .label {
    flex-grow: 0
}

#matrix table,.mrow td,span.person,td.cme,th {
    position: relative
}

td.cme {
    background: #fff;
    cursor: pointer
}

td.cme span {
    color: #c3c3c3;
    display: inline-block;
    font-size: 3em;
    margin: .1em 0;
    min-width: 1.3em
}

span {
    font-size: 1.5em
}

span.person {
    top: 0.05em;
    font-size: 3.2em;
    padding: 0 .05em
}

#matrix span.incorrect {
    transition: all .2s ease
}

span.incorrect:before {
    background: red;
    border-radius: 1em;
    content: '';
    height: .25em;
    position: absolute;
    transform: rotate(45deg) translate3d(.17em,.57em,0);
    transform-origin: 50% 50%;
    width: 1.6em
}

#matrix span.correct {
    animation: 1s ease forwards 1 getBig;
    background: 0 0;
    line-height: 0.3em;
    position: relative;
    font-size: 9em;
    display: inline-block;
    left: 50%;
    margin-left: -100%;
    box-shadow: none !important;
    width: 1em;
}

#matrix span.incorrect {
    border-radius: 100%;
    box-shadow: 0 0 0 .2em red;
    background: none;
}

[data-o="0"],[data-o="0"]:after {
    filter: none !important;
    opacity: .5
}

[data-o="0"]:after {
    content: '?';
    position: absolute;
    left: .7em;
    font-size: 0.7em;
    top: .3em;
    font-weight: 700
}

[data-o="1"] {
      box-shadow: inset 0 -0.25em 0.05em -0.15em rgb(0 0 0 / 18%),0 0.1em 0.2em -0.1em rgb(0 0 0 / 40%), 0 0.25em 0.2em -0.2em #7fdbff;
    background: #7fdbff
}

[data-o="2"] {
      box-shadow: inset 0 -0.25em 0.05em -0.15em rgb(0 0 0 / 18%),0 0.1em 0.2em -0.1em rgb(0 0 0 / 40%), 0 0.25em 0.2em -0.2em #ff9a43;
    background: #ff9a43
}

.lang.selected,[data-o="3"] {
      box-shadow: inset 0 -0.25em 0.05em -0.15em rgb(0 0 0 / 18%),0 0.1em 0.2em -0.1em rgb(0 0 0 / 40%), 0 0.25em 0.2em -0.2em #81da7b;
    background: #81da7b
}

[data-o="4"] {
      box-shadow: inset 0 -0.25em 0.05em -0.15em rgb(0 0 0 / 18%),0 0.1em 0.2em -0.1em rgb(0 0 0 / 40%), 0 0.25em 0.2em -0.2em #ffeb6c;
    background: #ffeb6c
}

[data-o="5"] {
      box-shadow: inset 0 -0.25em 0.05em -0.15em rgb(0 0 0 / 18%),0 0.1em 0.2em -0.1em rgb(0 0 0 / 40%), 0 0.25em 0.2em -0.2em #ff95e8;
    background: #ff95e8
}

[data-o="6"] {
      box-shadow: inset 0 -0.25em 0.05em -0.15em rgb(0 0 0 / 18%),0 0.1em 0.2em -0.1em rgb(0 0 0 / 40%), 0 0.25em 0.2em -0.2em #0074d9;
    background: #0074d9
}

[data-o="7"] {
      box-shadow: inset 0 -0.25em 0.05em -0.15em rgb(0 0 0 / 18%),0 0.1em 0.2em -0.1em rgb(0 0 0 / 40%), 0 0.25em 0.2em -0.2em #3d9970;
    background: #3d9970
}

[data-o="8"] {
      box-shadow: inset 0 -0.25em 0.05em -0.15em rgb(0 0 0 / 18%), 0 0.25em 0.3em -0.25em #b775ff;
    background: #b775ff
}

#wb {
    overflow-x: hidden;
    overflow-y: scroll;
    padding: 5vh 0 40vh 3vw;
    transition: background-color .25s ease
}

#wbc {
    font-size: 1.2em;
    padding-bottom: 50vh
}

#cont:not(.end) #wb>*,#cont:not(.end) td.cme span,.lang.selected,#det, button {
    filter: drop-shadow(0 6px 3px rgba(0,0,0,.08))
}

.end #wb {
    background: #444;
    font-size: 2.2rem;
    min-height: 50vh;
    transition: all .5s ease
}

.end #wbc * {
    display: none
}

.end #wbc:after,.end #wbc:before {
    animation: fadeOn 1s 1 forwards;
    display:none;
    color: #fff;
}

.end #wbc:before {
    content: attr(data-flair);
    line-height: 1em;
    margin-top: .15em
}

.end #wbc:after {
    content: attr(data-msg);
    display: block;
    font-size: 4rem
}

#wb h1,.loading,#li {
    animation: 1s ease forwards 1 fadeOn;
    font-size: 2.4rem
}

.loading {
    animation: 3s linear alternate infinite look;
}

.tutorial {
    animation: fadeOn 1s 1 forwards;
    background: #7fdbff;
    color: #267b9c;
    margin: 0 auto;
    padding: .5em;
    width: 80%
}

h3, #li {
    color: #bbb
}

.clue {
    animation: 1s ease both 1 growOn;
    min-height: 1em;
    line-height: 3em
}

.clue span:not(.person) {
    display: inline-block;
    line-height: 1.5em;
    pointer-events: none;
    margin-left: 0.25em;
    width: 1.5em
}

.clue h3 {
    line-height: 2em
}

.night table:before,.night td.cme {
    background: #444
}

button.clue {
    animation: 1s ease forwards 1 fadeOn;
    background: #f7f7f736;
    border: none;
    box-shadow: 0 0 2px #5d5d5d, 0 0.2em 0px #d6d6d6, 0 0.21em 3px -1px #5d5d5d, 0 0.3em 8px rgb(74 74 74 / 19%);
    color: #aaa;
    cursor: pointer;
    font-size: 2.5rem;
    line-height: 1.5em;
    min-width: auto;
    padding: 0 .25em;
    width: 60%;
    margin-bottom: 0.5em;
    position: relative
}

.waiting:after {
    animation: ellipsis steps(6) 2s infinite;
    content: "\2026";
    display: inline-block;
    overflow: hidden;
    width: 0
}

#menu {
  font-size: 2vw;
}

#menu,#root {
    height: 100%;
    justify-content: space-around;
    padding: 3em 0;
    position: fixed;
    transition: background-color .2s ease;
    width: 100vw;
    z-index: 10
}

.title {
    font-size: 8.5vw;
    font-weight: 700;
    line-height: 1
}

.title .bl {
    -webkit-background-clip: text;
    -webkit-text-stroke: 0.02em #444;
    animation: bg 60s linear infinite alternate;
    background-clip: text;
    background-image: url("data:image/svg+xml,<svg width='1200px' height='150px' xmlns='http://www.w3.org/2000/svg'><text x='0' y='130px' font-size='200px'>👨🏻‍🏭👨🏿‍🎓👩🏼‍🚒🧝🏻‍♀️👩🏾‍✈️👰🏽🧙🏼‍♂️</text></svg>");
    background-position-y: 3em;
    background-size: 210% 80%;
    color: rgba(100,100,100,.5)
}

#menu h2 {
    color: #9670c7;
    font-size: 1.6em
}

#menu button {
    font-size: 3em;
    margin: .5em;
    min-width: auto;
    width: 40%
}

.lang-h,.right {
    font-size: 1.2em;
    margin: .4em 0 .1em 20em
}

#menu .right h2 {
    color: #e59e0e
}

#menu .dec {
    color: #666
}

.dec span {
    display: inline-block;
    font-size: 1.2em;
    width: 17vw
}

.lang-h {
    display: flex;
    justify-content: space-around;
    margin: 0 auto;
    max-width: 60em;
    padding: 0 50px
}

#pause,.lang {
    cursor: pointer
}

.lang {
    margin-top: 5px;
    padding: .7em 0;
    position: relative;
    white-space: nowrap;
    width: 9em
}

.set {
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 800px;
    padding: 0 50px
}

#pause {
    color: #bbb;
    font-size: 2rem;
    line-height: 1em;
    padding: .5em;
    position: absolute;
    left: 0;
    z-index: 1
}

.night #pause {
    color: #666
}

input[type=checkbox] {
    height: 1.25em;
    width: 1.25em;
    border-radius: 2em;
    appearance: unset;
    border: .1em solid #9670c7
}

input[type=checkbox]:checked {
    box-shadow: inset 0 0 0 .2em #fff;
    background: #9670c7
}

.switch {
    display: inline-block;
    font-size: 1rem;
    height: 3.4em;
    position: relative;
    top: -.9em;
    width: 8em
}

svg {
    display: none;
    height: 50%;
    position: absolute;
    width: 100%
}

.end svg {
    display: block
}

.path {
    animation: dash 3s linear forwards 1;
    stroke-dashoffset: 400;
    stroke-linecap: round
}

#root {
    animation: .5s fadeOn 1 ease
}

#root label {
    display: inline-block;
    font-size: 1.25rem;
    padding: .5em
}

#root button {
    color: #aaa;
    margin: .5em 0;
    text-shadow: none
}

#mhold,.root-col {
    display: flex;
    flex-direction: column
}

#mod {
    overflow: scroll;
    justify-content: end;
    padding-top: 2em
}

input {
    font-size: 1.8rem;
    margin-bottom: 1em;
    padding: .1em;
    text-align: center;
    width: 80%
}

#com-list {
    background: rgba(255,255,255,.5);
    height: 17.5em;
    margin-top: 1em;
    overflow-y: scroll
}

.root-col {
    background: rgba(0,0,0,.1);
    border: 1px solid #aaa;
    padding: 1em;
    position: relative;
    width: 60vw;
    margin: 1em auto;
    min-height: 57vmin;
    justify-content: space-around;
    font-size: 0.7rem;
    align-items: center
}

.root-col:before {
    background: #e5e5e5;
    border: 1px solid #aaa;
    border-bottom: none;
    border-top-left-radius: .5em;
    border-top-right-radius: .5em;
    content: '🔍';
    font-size: 2.5rem;
    height: 1em;
    left: .25em;
    position: absolute;
    top: -1em;
    width: 3em
}

.night .root-col:before {
    background: #2e2e2e
}

#com-list,.sub-game,input {
    border: 1px solid #ccc
}

.sub-game {
    background: rgba(0,0,0,.15);
    cursor: pointer;
    font-size: 1rem;
    margin: .5em;
    padding: .5em
}

@media screen and (min-width:1000px),(orientation:landscape) {
    #menu {
      font-size: 2.3vmin;
    }
    html, body {
      font-size: 2.2vmin;
    }
    #wb,svg {
        height: 100%
    }

    #wb {
        border: 0;
        padding-right: 53vw
    }

    .mrow td.cme {
        font-size: 1.25rem
    }

    #matrix {
        border: 0;
        border-left: 1px solid #aaaa;
        bottom: auto;
        box-shadow: none;
        height: 100%;
        overflow-y: scroll;
        padding-top: 11rem;
        right: 0;
        top: 0;
        width: 50.5vw
    }

    #matrix table {
        font-size: 1rem;
        margin: 0 auto;
        top: 0
    }

    button.clue {
        min-width: 80%
    }

    .end #wbc:before {
        font-size: 13.3rem;
        margin-top: 20vh
    }

    th.person {
        animation: sib .5s ease both;
        text-shadow: 0 0 4px rgba(0,0,0,.75);
        font-size: 3rem
    }

    .end th.person {
        text-shadow: none;
        top: 0
    }

    svg {
        width: 50%
    }

    span[data-o="0"] {
        padding: .09em 0!important
    }

    #mhold {
        flex-direction: row;
        justify-content: space-around
    }

    .root-col {
        margin: 1em;
        animation: none
    }

    .end #wbc:before {
      display: block;
    }
}

.spacer {
    height: 3.2em
}

#hun {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.25em 0.5em;
    pointer-events: none;
    border-bottom-left-radius: 0.5em;
    line-height: 1em;
}

.mrow, .cme, .cme span:not([data-o='0']) {
  transform-style: preserve-3d;
  perspective-origin: center center;
  perspective: 2000px;
  transition: transform 0.5s ease;
}

.dan {
  transform: translate3d(0, 1.5em, -5em) rotateX(70deg)  ;
}

span:not([data-o='0']) {
  transition: transform 1s ease;
}

.dan span:not([data-o='0']) {
  transform: rotateX(-70deg) translate3d(0, -1em, 0) scale(0.01);
}
