/* global */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #f5f8ff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.4;
    -webkit-text-size-adjust: 100%;
}

img {
    border: 0;
    vertical-align: middle;
}

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

/* general */
.t002 {
    max-width: 500px;
    margin: 0 auto;
    background: #f5f8ff;
}

.t002-block {
    width: 100%;
    /* margin-bottom: 16px; */
}

.t002-block img {
    display: block;
    width: 100%;
    height: auto;
}

.t002-block a {
    display: block;
}

/* support button */
.t002-support-icon {
    font-size: 25px;
    line-height: 1;
}

.t002-support-text {
    white-space: nowrap;
}

/* speed test */
.t002-fixed .t002-speed-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    pointer-events: auto;
}

.t002-fixed .t002-speed-modal {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 24px);
    max-width: 460px;
    background: #fefefe;
    border-radius: 16px;
    padding: 20px;
    pointer-events: auto;
}

.t002-speed-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.t002-speed-btn {
    background: #cb982a;
    color: #fff;
    padding: 6px 14px;
    border-radius: 10px;
    text-decoration: none;
}

.t002-speed-close {
    text-align: center;
    font-size: 28px;
    cursor: pointer;
}

/* Speed signal */
.t002-speed-signal {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    color: #16c60c;
    font-size: 14px;
}

.t002-speed-signal .bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
    margin-bottom: 2px;
}

.t002-speed-signal .bars span {
    width: 4px;
    background: #16c60c;
    border-radius: 2px;
    opacity: .25;
}

.t002-speed-signal .bars span:nth-child(1) {
    height: 6px;
}

.t002-speed-signal .bars span:nth-child(2) {
    height: 10px;
}

.t002-speed-signal .bars span:nth-child(3) {
    height: 14px;
}

.t002-speed-signal .bars span:nth-child(4) {
    height: 18px;
}

.t002-speed-signal.good .bars span {
    opacity: 1;
}

.t002-speed-signal.mid .bars span:nth-child(-n+3) {
    opacity: 1;
}

.t002-speed-signal.bad .bars span:nth-child(-n+2) {
    opacity: 1;
}

.t002-speed-signal.poor .bars span:nth-child(1) {
    opacity: 1;
}

.t002-speed-signal .ms {
    font-size: 12px;
    line-height: 1;
}

/* floating buttons */
.t002-fixed .t002-floating {
    position: absolute;
    right: 12px;
    top: 22%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

.t002-floating a {
    display: block;
    width: 56px;
    height: 56px;
}

.t002-floating img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Fixed footer buttons */
.t002-fixed .t002-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 12px;
    padding: 14px 12px;
    background: rgba(0, 0, 0, 0.8);
    pointer-events: auto;
}

.t002-footer-btn {
    width: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 10px;
    font-weight: bold;
    text-decoration: none;
    overflow: visible;
}

.t002-footer-text {
    line-height: 1;
    z-index: 1;
}

.t002-footer-bubble {
    position: absolute;
    top: -34px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ea4e3d;
    color: #ffffff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 14px;
    white-space: nowrap;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.t002-footer-bubble::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #ea4e3d;
}

/* carousel */
.t002-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.t002-carousel-track {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease;
}

.t002-carousel-slide {
    flex: 0 0 100%;
}

.t002-carousel-slide img {
    width: 100%;
    display: block;
}

/* fixed-layer wrapper */
.t002-fixed {
    position: fixed;
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    z-index: 900;
    pointer-events: none;
}