#g2048{
    position: absolute;
    left: 0;
    right: 0;
    top: 4.5rem;
    bottom: 0.04rem;
    z-index: 1;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    color: #fff;
    font-family: "FZY3K", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    -webkit-user-select: none;
    user-select: none;
    touch-action: pan-y;
}
#g2048 .path{
    position: relative;
    -webkit-flex: none;
    flex: none;
    padding: 0 0.16rem;
}
#g2048 .path-title{
    display: block;
    width: 1.42rem;
    height: 0.6rem;
}
#g2048 .path-track{
    position: relative;
    width: 6.9rem;
    max-width: 100%;
    margin: 0.02rem auto 0;
}
#g2048 .path-line{
    display: block;
    width: 100%;
    height: auto;
}
#g2048 .path-stars{
    position: relative;
    height: 0.28rem;
}
#g2048 .path-stars span{
    position: absolute;
    top: 0;
    color: #fff;
    font-size: 0.18rem;
    line-height: 1;
    white-space: nowrap;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    text-shadow: 0 0.02rem 0.04rem rgba(60,20,110,0.45);
}
#g2048 .goal{
    position: relative;
    width: 2.83rem;
    height: 0.64rem;
    margin: 0.04rem 0.12rem 0.06rem auto;
}
#g2048 .goal img{
    display: block;
    width: 100%;
    height: 100%;
}
#g2048 .goal-text{
    position: absolute;
    left: 24%;
    right: 5%;
    top: 0;
    bottom: 0;
    margin: 0;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    color: #6a42c6;
    font-size: 0.2rem;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
}
#g2048 .goal-text b{
    font-weight: 700;
}
#g2048 .hud{
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
#g2048 .score-main{
    font-size: 0.22rem;
    line-height: 1;
}
#g2048 .score-num{
    color: #f0902a;
    font-size: 0.36rem;
    font-style: italic;
    font-weight: 900;
}
#g2048 .score-num em{ font-style: inherit; }
#g2048 .score-best{
    margin: 0;
    color: #a67a52;
    font-size: 0.2rem;
    font-weight: 700;
}
#g2048 .record{
    display: inline-block;
    margin-left: 0.06rem;
    padding: 0 0.08rem;
    border-radius: 1rem;
    background: #ffe1b5;
    color: #e07a20;
    font-style: normal;
    font-size: 0.18rem;
}
#g2048 .record[hidden]{ display: none; }
#g2048 .coin{
    color: #f08a1e;
    font-size: 0.22rem;
    font-weight: 900;
    font-style: italic;
}
#g2048 .coin b{
    font-size: 0.32rem;
    font-style: italic;
}
#g2048 .play{
    -webkit-flex: 1;
    flex: 1;
    min-height: 0;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    margin-top: 0rem;
}
#g2048 .board-box{
    display: block;
    width: 100%;
    height: 100%;
}
#g2048 .board-frame{
    position: relative;
    width: 100%;
    height: auto;
    max-height: 100%;
    aspect-ratio: 750 / 662;
    background: url(../img/cat/pop_interfacebox.png) no-repeat center / 100% 100%;
}
#g2048 .board{
    --pad: 0.1rem;
    --gap: 0.1rem;
    position: absolute;
    left: 11.34%;
    top: 9.52%;
    width: 77.33%;
    height: 87.62%;
    border-radius: 0.2rem;
    background: #F3EFFA;
    touch-action: none;
}
#g2048 .cells,
#g2048 .tiles{
    position: absolute;
    top: var(--pad);
    right: var(--pad);
    bottom: var(--pad);
    left: var(--pad);
}
#g2048 .cells{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: var(--gap);
}
#g2048 .cell{
    border-radius: 0.18rem;
    background: #D5CBE6;
}
#g2048 .tile.v2 .tile-face{ background: #E4E7EF; }
#g2048 .tile.v4 .tile-face{ background: #D9F0CC; }
#g2048 .tile.v8 .tile-face{ background: #B2DBC2; }
#g2048 .tile.v16 .tile-face{ background: #C4E1FC; }
#g2048 .tile.v32 .tile-face{ background: #A5BCEB; }
#g2048 .tile.v64 .tile-face{ background: #C9B2ED; }
#g2048 .tile.v128 .tile-face{ background: #F7E49A; }
#g2048 .tile.v256 .tile-face{ background: #F8C086; }
#g2048 .tile.v512 .tile-face{ background: #EF9AA4; }
#g2048 .tile.v1024 .tile-face,
#g2048 .tile.v2048 .tile-face,
#g2048 .tile.v4096 .tile-face,
#g2048 .tile.v8192 .tile-face{ background: #A996D7; }
#g2048 .tiles{ pointer-events: none; }
#g2048 .tile{
    position: absolute;
    left: 0;
    top: 0;
    width: calc((100% - 3 * var(--gap)) / 4);
    height: calc((100% - 3 * var(--gap)) / 4);
    -webkit-transform: translate(calc(var(--c) * (100% + var(--gap))), calc(var(--r) * (100% + var(--gap))));
    transform: translate(calc(var(--c) * (100% + var(--gap))), calc(var(--r) * (100% + var(--gap))));
    -webkit-transition: -webkit-transform 0.14s cubic-bezier(0.2, 0.75, 0.2, 1);
    transition: transform 0.14s cubic-bezier(0.2, 0.75, 0.2, 1);
}
#g2048 .tile-inner{
    width: 100%;
    height: 100%;
    -webkit-transform-origin: 50% 55%;
    transform-origin: 50% 55%;
}
#g2048 .tile-face{
    width: 100%;
    height: 100%;
    border-radius: 0.18rem;
    box-sizing: border-box;
    overflow: hidden;
    background: transparent;
}
#g2048 .tile-face img{
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    border-radius: 0.18rem;
    display: block;
    pointer-events: none;
}
#g2048 .tile.is-gone{ z-index: 1; }
#g2048 .tile.is-gone .tile-inner{
    opacity: 0;
    -webkit-transition: opacity 0.12s linear;
    transition: opacity 0.12s linear;
}
#g2048 .tile-inner.is-fresh{ -webkit-animation: g2048Spawn 0.2s ease; animation: g2048Spawn 0.2s ease; }
#g2048 .tile-inner.is-pop{ -webkit-animation: g2048Merge 0.22s ease; animation: g2048Merge 0.22s ease; }
#g2048 .tile.v1024 .tile-inner,
#g2048 .tile.v2048 .tile-inner,
#g2048 .tile.v4096 .tile-inner,
#g2048 .tile.v8192 .tile-inner{
    -webkit-filter: drop-shadow(0 0 0.06rem rgba(255,186,46,0.55));
    filter: drop-shadow(0 0 0.06rem rgba(255,186,46,0.55));
}
#g2048 .float-score{
    position: absolute;
    left: 50%;
    top: 0;
    z-index: 5;
    color: #e07a20;
    font-size: 0.28rem;
    font-weight: 900;
    font-style: italic;
    -webkit-animation: g2048Float 0.65s ease forwards;
    animation: g2048Float 0.65s ease forwards;
    pointer-events: none;
}
#g2048 .stand.shake{ -webkit-animation: g2048Shake 0.22s linear; animation: g2048Shake 0.22s linear; }
#g2048 .score-num.bump{ -webkit-animation: g2048Bump 0.28s ease; animation: g2048Bump 0.28s ease; }

#g2048-mask{
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 900;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    background: rgba(80,48,20,0.28);
    font-family: "FZY3K", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
}
#g2048-mask[hidden]{ display: none; }
#g2048-mask .dialog{
    text-align: center;
}
#g2048-mask h2{
    margin: 0 0 0.05rem;
    font-size: 0.2rem;
    color: #8a4e28;
}
#g2048-mask p{
    margin: 0;
    color: #8d6244;
    font-size: 0.2rem;
    line-height: 1.6;
    font-weight: 700;
}
#g2048-mask b{ color: #e07a20; }
#g2048-mask .dialog-actions{
    margin-top: 0.24rem;
}
#g2048-mask .btn{
    border: 0;
    margin: 0 0.08rem;
    border-radius: 1rem;
    padding: 0.12rem 0.24rem;
    background: #f3ddb8;
    color: #8a5430;
    font-size: 0.26rem;
    font-weight: 800;
    font-family: inherit;
    box-shadow: 0 0.03rem 0 #e2c08a;
    cursor: pointer;
}
#g2048-mask .btn-primary{
    background: #f5a04a;
    color: #7a3e12;
}
#g2048-mask .dialog.is-goal{
    padding: 0.5rem 0;
    width: 7.5rem;
    height: 3.35rem;
    background: url(../img/pop/pop_interfacebox1.png) no-repeat center / 100% 100%;
    box-sizing: border-box;
}
#g2048-mask .dialog.is-goal p{
    color: #6d4cb8;
    font-size: 0.24rem;
    font-weight: 700;
    line-height: 2;
}
#g2048-mask .dialog.is-goal .ask{
    display: block;
    margin-top: 0;
}
#g2048-mask .dialog.is-goal .dialog-actions{
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: center;
    justify-content: center;
    margin-top: 0.2rem;
}
#g2048-mask .dialog.is-win .dialog-actions{
    margin-top: 0.7rem;
}
#g2048-mask .dialog.is-goal .btn{
    width: 1.54rem;
    height: 0.52rem;
    min-width: 0;
    margin: 0 0.14rem;
    padding: 0 0 0.08rem;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 100%;
    color: #fff;
    font-size: 0.24rem;
    font-weight: 700;
    line-height: 0.52rem;
    box-shadow: none;
}
#g2048-mask .dialog.is-goal .btn-leave{
    background-image: url(../img/pop/pop_cardbtn.png);
    color: #6a4bb5;
}
#g2048-mask .dialog.is-goal .btn-share{
    background-image: url(../img/pop/pop_cardbtn2.png);
    color: #e36a12;
}

@-webkit-keyframes g2048Spawn{
    0%{ -webkit-transform: scale(0.15); }
    70%{ -webkit-transform: scale(1.08); }
    100%{ -webkit-transform: scale(1); }
}
@keyframes g2048Spawn{
    0%{ transform: scale(0.15); }
    70%{ transform: scale(1.08); }
    100%{ transform: scale(1); }
}
@-webkit-keyframes g2048Merge{
    0%{ -webkit-transform: scale(0.72); }
    55%{ -webkit-transform: scale(1.14); }
    100%{ -webkit-transform: scale(1); }
}
@keyframes g2048Merge{
    0%{ transform: scale(0.72); }
    55%{ transform: scale(1.14); }
    100%{ transform: scale(1); }
}
@-webkit-keyframes g2048Float{
    0%{ -webkit-transform: translate(-50%, 0.04rem); opacity: 1; }
    100%{ -webkit-transform: translate(-50%, -0.4rem); opacity: 0; }
}
@keyframes g2048Float{
    0%{ transform: translate(-50%, 0.04rem); opacity: 1; }
    100%{ transform: translate(-50%, -0.4rem); opacity: 0; }
}
@-webkit-keyframes g2048Shake{
    20%{ -webkit-transform: translateX(-0.06rem); }
    40%{ -webkit-transform: translateX(0.06rem); }
    60%{ -webkit-transform: translateX(-0.04rem); }
    80%{ -webkit-transform: translateX(0.03rem); }
}
@keyframes g2048Shake{
    20%{ transform: translateX(-0.06rem); }
    40%{ transform: translateX(0.06rem); }
    60%{ transform: translateX(-0.04rem); }
    80%{ transform: translateX(0.03rem); }
}
@-webkit-keyframes g2048Bump{
    45%{ -webkit-transform: scale(1.16); }
    100%{ -webkit-transform: scale(1); }
}
@keyframes g2048Bump{
    45%{ transform: scale(1.16); }
    100%{ transform: scale(1); }
}
