:root {
    --tp21-gold: #e6c37a;
    --tp21-gold-deep: #c9a44a;
    --tp21-gold-text: #f0d78c;
    --tp21-bg: #0b0b0b;
    --tp21-btn-text: #1a1408;
}

html {
    font-size: 16px;
}

html,
body {
    width: 100%;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--tp21-bg);
    color: #fff;
    min-height: 100vh;
}

/* pcEnable=n：PC 仍展示 H5，限制最大宽度并居中 */
html.h5-only .web-wrap {
    display: none !important;
}

html.h5-only body {
    min-height: 100vh;
    background-color: #eef0f5;
}

html.h5-only #app {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--tp21-bg);
    position: relative;
    display: flex;
    flex-direction: column;
}

.tp21-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100vh;
    background: var(--tp21-bg);
    color: #fff;
}

.tp21-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px 8px;
}

.tp21-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 72%;
    object-fit: contain;
}

.tp21-hero {
    flex-shrink: 0;
    position: relative;
}

.tp21-slide-copy {
    text-align: center;
    padding: 8px 16px 12px;
}

.tp21-hero-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.4;
    background: linear-gradient(180deg, #f6d99d, #e2b372);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tp21-hero-subtitle {
    margin-top: 8px;
    color: #a8a8aa;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
}

.tp21-swiper,
.tp21-swiper.swiper,
.tp21-swiper.swiper-container {
    width: 100%;
    position: relative;
    overflow: hidden;
    list-style: none;
    padding: 0;
    z-index: 1;
}

.tp21-swiper .swiper-wrapper {
    position: relative;
    width: 100%;
    z-index: 1;
    display: flex;
    transition-property: transform;
    box-sizing: content-box;
}

.tp21-swiper .swiper-slide {
    flex-shrink: 0;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.tp21-slide-img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.tp21-pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    z-index: 10;
    text-align: center;
}

.tp21-pagination .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    margin: 0 4px;
    display: inline-block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    opacity: 1;
}

.tp21-pagination .swiper-pagination-bullet-active {
    width: 18px;
    border-radius: 4px;
    background: var(--tp21-gold);
}

.tp21-actions {
    flex-shrink: 0;
    padding: 0 28px;
    text-align: center;
}

.tp21-download {
    display: block;
    width: 100%;
    background-image: linear-gradient(90deg, #e2b271, #f6d99d);
    border-radius: 20px;
    height: 44px;
    margin: 15px auto;
    text-align: center;
    line-height: 44px;
    color: #633100;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.tp21-download:active {
    transform: scale(0.98);
}

.tp21-official {
    margin-top: 12px;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-all;
    cursor: pointer;
}

.tp21-official[hidden] {
    display: none;
}

.tp21-official-url {
    color: #fff;
}

.tp21-footer {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    margin-top: auto;
    height: 52px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #111;
}

.tp21-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.tp21-tab.is-active {
    color: var(--tp21-gold-text);
    font-weight: 600;
}

.tp21-tab.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 18%;
    right: 18%;
    height: 2px;
    background: var(--tp21-gold);
    border-radius: 1px;
}

.tp21-line-sheet {
    position: fixed;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 520px;
    transform: translateX(-50%);
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    transition: opacity 0.28s ease-out;
}

.tp21-line-sheet.is-open {
    display: flex;
    opacity: 1;
}

.tp21-line-sheet__dim {
    flex: 1;
    min-height: 0;
}

.tp21-line-sheet__panel {
    flex-shrink: 0;
    width: 100%;
    max-height: 72%;
    overflow: auto;
    background: #1c1c1c;
    border-radius: 16px 16px 0 0;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    transform: translateY(100%);
    transition: transform 0.28s ease-out;
}

.tp21-line-sheet.is-open .tp21-line-sheet__panel {
    transform: translateY(0);
}

.tp21-line-title {
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.tp21-line-subtitle {
    margin-top: 8px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.tp21-line-list {
    margin-top: 16px;
}

.tp21-line-item {
    display: block;
    width: 100%;
    height: 44px;
    margin-bottom: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(180deg, #f3dd9c 0%, #d4af5a 100%);
    color: var(--tp21-btn-text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.tp21-line-cancel {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: 6px;
    border: 1px solid rgba(230, 195, 122, 0.45);
    border-radius: 8px;
    background: transparent;
    color: var(--tp21-gold-text);
    font-size: 15px;
    cursor: pointer;
}

@media (min-width: 521px) {
    html.h5-only .tp21-page {
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }
}
