/* Page-only overrides for the embedded learning-content shell. */
.game-pageiframe {
    background: #f3f5f7;
}

.game-pageiframe .loading {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(255, 255, 255, .98);
    opacity: 1;
    transition: opacity .14s ease-out;
}

.game-pageiframe .loading.is-complete {
    opacity: 0;
    pointer-events: none;
}

.game-pageiframe .loading-card {
    width: min(240px, 76vw);
    display: grid;
    justify-items: center;
    gap: 12px;
    color: #334155;
}

.game-pageiframe .loading-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #c2410c;
    background: #fff3e8;
    font-size: 19px;
}

.game-pageiframe .loading-card p {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.game-pageiframe .loading-progress {
    width: 100%;
    height: 5px;
    overflow: hidden;
    border-radius: 99px;
    background: #edf1f5;
}

.game-pageiframe .loading-progress-value {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #f97316;
    transition: width .08s linear;
}

.game-pageiframe .loading-percent {
    color: #94a3b8;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.game-pageiframe #body-wrap {
    z-index: 900;
    background: rgba(15, 23, 42, .44);
    opacity: 0;
    transition: opacity .22s ease;
}

.game-pageiframe #body-wrap.is-visible {
    opacity: 1;
}

.game-pageiframe .ball_float_box {
    width: 90vw;
    width: min(90vw, 380px);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border-radius: 0 18px 18px 0;
    background: #f7f9fb;
    box-shadow: 16px 0 42px rgba(15, 23, 42, .2);
    transform: translate3d(calc(-100% - 42px), 0, 0);
    transition: transform .24s cubic-bezier(.2, .8, .2, 1);
    will-change: transform;
}

.game-pageiframe .ball_float_box.show_ball {
    left: 0;
    transform: translate3d(0, 0, 0);
}

.game-pageiframe .ball_float_box .close_btn {
    width: 42px;
    height: 76px;
    top: 50%;
    right: -42px;
    margin-top: -38px;
    border: 0;
    border-radius: 0 14px 14px 0;
    background: #fff;
    box-shadow: 10px 0 20px rgba(15, 23, 42, .1);
    text-indent: 0;
    font-size: 0;
    cursor: pointer;
}

.game-pageiframe .ball_float_box .close_btn:after {
    display: none;
}

.game-pageiframe .ball_float_box .close_btn > .fa-solid {
    color: #64748b;
    font-size: 18px;
    line-height: 1;
}

.game-pageiframe .ball_float_box .close_btn:active {
    background: #f8fafc;
}

.game-pageiframe .ball_float_box .ball_user_info {
    min-height: 122px;
    padding: calc(20px + env(safe-area-inset-top)) 70px 20px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    border-radius: 0 18px 0 0;
}

.game-pageiframe .ball_float_box .ball_user_info > a:not(.ball-panel-back) {
    display: block;
    flex: 0 0 58px;
}

.game-pageiframe .ball_float_box .ball_user_info .ball-panel-back {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    font-size: 17px;
    line-height: 1;
    touch-action: manipulation;
}

.game-pageiframe .ball_float_box .ball_user_info .ball-panel-back:active {
    background: rgba(255, 255, 255, .3);
}

.game-pageiframe .ball_float_box .ball_user_info .user_avatar {
    width: 58px;
    height: 58px;
    float: none;
    display: block;
    border: 2px solid rgba(255, 255, 255, .74);
    border-radius: 50%;
    background: #fff7ed;
    box-shadow: 0 4px 12px rgba(154, 52, 18, .2);
    object-fit: cover;
    flex: 0 0 58px;
}

.game-pageiframe .ball_float_box .ball_user_info .user_info {
    min-width: 0;
    margin-left: 0;
    float: none;
    flex: 1 1 auto;
}

.game-pageiframe .ball_float_box .ball_user_info .user_info a {
    color: inherit;
}

.game-pageiframe .ball_float_box .ball_user_info .user_info .user_name {
    margin-top: 0;
    overflow: hidden;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-pageiframe .ball_float_box .ball_user_info .user_info .user_id {
    margin-top: 3px;
    overflow: hidden;
    color: rgba(255, 255, 255, .84);
    font-size: 12px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-pageiframe .ball_float_box .ball_func_link {
    height: auto;
    padding: 0 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-bottom: 1px solid #e8edf2;
    background: #fff;
}

.game-pageiframe .ball_float_box .ball_func_link .ball_func_link_item {
    width: auto;
    padding: 0;
    float: none;
}

.game-pageiframe .ball_float_box .ball_func_link .ball_func_link_item .ball-panel-link {
    min-height: 50px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    overflow: visible;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    touch-action: manipulation;
    transition: color .18s ease, border-color .18s ease;
}

.game-pageiframe .ball_float_box .ball_func_link .ball_func_link_item .ball-panel-link > .fa-solid {
    display: inline-block;
    height: auto;
    margin: 0;
    color: currentColor;
    font-size: 16px;
    line-height: 20px;
}

.game-pageiframe .ball_float_box .ball_func_link .ball_func_link_item .ball-panel-link:before {
    display: none;
    content: none;
    background: none;
}

.game-pageiframe .ball_float_box .ball_func_link .ball_func_link_item .ball-panel-link > span {
    display: inline;
}

.game-pageiframe .ball_float_box .ball_func_link .ball_func_link_item .ball-panel-link.cur {
    border-bottom-color: #f97316;
    color: #c2410c;
}

.game-pageiframe .ball_float_box .ball_func_link .ball_func_link_item .ball-panel-link:active {
    color: #c2410c;
}

.game-pageiframe .ball_float_box .ball_float_content_box {
    width: auto;
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2px 18px calc(18px + env(safe-area-inset-bottom));
    background: #fff;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.game-pageiframe .ball_float_box .ball-empty-state {
    padding: 34px 14px;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

.game-pageiframe .ball_float_box .g_list {
    margin: 0;
    padding: 0;
}

.game-pageiframe .ball_float_box .g_list .g_one {
    width: 100%;
    min-height: 74px;
    height: auto;
    margin: 0;
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 0;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.game-pageiframe .ball_float_box .g_list:last-child .g_one {
    border-bottom: 0;
}

.game-pageiframe .ball_float_box .g_list .g_one > a:first-child {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
}

.game-pageiframe .ball_float_box .g_list .g_one .g_pic {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    float: none;
    overflow: hidden;
    border-radius: 10px;
    background: #f1f5f9;
}

.game-pageiframe .ball_float_box .g_list .g_one .g_pic img {
    width: 48px;
    height: 48px;
    display: block;
    border-radius: inherit;
    object-fit: cover;
}

.game-pageiframe .ball_float_box .g_list .game-score-item {
    min-height: 70px;
    gap: 10px;
}

.game-pageiframe .ball_float_box .g_list .game-score-item .game-score-rank {
    width: 26px;
    height: 26px;
    display: grid;
    flex: 0 0 26px;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    color: #71877c;
    background: #edf4f0;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.game-pageiframe .ball_float_box .g_list .game-score-item .game-score-rank img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.game-pageiframe .ball_float_box .g_list .game-score-item .game-score-rank-number {
    display: none;
}

.game-pageiframe .ball_float_box .g_list .game-score-item .game-score-rank.rank-is-number img {
    display: none;
}

.game-pageiframe .ball_float_box .g_list .game-score-item .game-score-rank.rank-is-number .game-score-rank-number {
    display: block;
}

.game-pageiframe .ball_float_box .g_list .game-score-item .g_pic {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
}

.game-pageiframe .ball_float_box .g_list .game-score-item .g_topic {
    padding-left: 0;
}

.game-pageiframe .ball_float_box .g_list .g_one .g_topic {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
    float: none;
    padding: 0 0 0 12px;
}

.game-pageiframe .ball_float_box .g_list .g_one .g_topic h4 {
    width: 100%;
    height: auto;
    overflow: hidden;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-pageiframe .ball_float_box .g_list .g_one .g_topic h4 span {
    max-width: 100%;
    overflow: hidden;
    float: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-pageiframe .ball_float_box .g_list .g_one .g_topic h4 em {
    display: none;
}

.game-pageiframe .ball_float_box .g_list .g_one .g_topic p {
    margin-top: 2px;
    overflow: hidden;
    color: #94a3b8;
    font-size: 12px;
    line-height: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.game-pageiframe .ball_float_box .g_list .g_one .g_link {
    width: auto;
    min-width: auto;
    height: 36px;
    margin: 0 0 0 8px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    flex: 0 0 auto;
    float: none;
    border-radius: 0;
    background: transparent;
    color: #c2410c;
    font-size: 13px;
    font-weight: 600;
    line-height: 36px;
    touch-action: manipulation;
}

.game-pageiframe .ball_float_box .g_list .g_one .g_link .fa-solid {
    font-size: 11px;
}

.game-pageiframe .ball_float_box .my_kefu_box {
    padding: 24px 0;
    background: transparent;
}

.game-pageiframe .ball_float_box .my_kefu_box .kefu_qrcode {
    width: min(180px, 65vw);
    height: auto;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(15, 23, 42, .1);
}

.game-pageiframe .ball_float_box .my_kefu_box .kefu_info p {
    color: #64748b;
    font-size: 13px;
}

.game-pageiframe .ball_float_box .my_kefu_box .kefu_info p b {
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.game-pageiframe .nav .top li {
    width: 58px;
    max-width: 58px;
}

.game-pageiframe .nav .top li img {
    box-shadow: none;
}

@media (min-width: 768px) {
    .game-pageiframe .ball_float_box {
        width: 360px;
        border-radius: 0 20px 20px 0;
    }

    .game-pageiframe .ball_float_box .ball_user_info {
        border-radius: 0 20px 0 0;
    }

    .game-pageiframe .nav .top li {
        width: 62px;
        max-width: 62px;
    }
}

@media (max-height: 560px) {
    .game-pageiframe .ball_float_box .ball_user_info {
        min-height: 92px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .game-pageiframe .ball_float_box .ball_func_link {
        padding-right: 14px;
        padding-left: 14px;
    }

    .game-pageiframe .ball_float_box .ball_func_link .ball_func_link_item .ball-panel-link {
        min-height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-pageiframe .loading,
    .game-pageiframe .loading-progress-value,
    .game-pageiframe .ball_float_box,
    .game-pageiframe .ball_float_box .close_btn,
    .game-pageiframe .ball_float_box .ball-panel-back,
    .game-pageiframe .ball_float_box .ball_func_link .ball_func_link_item .ball-panel-link {
        transition: none;
    }
}
