/* ============================================================
   潮汐守望者 · 官方活动商城
   Visual: Light premium storefront (white background)
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #ffffff;
    --bg-subtle: #f7f8fa;
    --bg-muted: #eef0f4;
    --surface: #f5f6f8;
    --surface-2: #ebedf2;
    --panel: #ffffff;
    --panel-edge: rgba(0, 0, 0, 0.08);

    /* 文字色阶：深 → 浅，统一中性灰 */
    --heading: #1a1f2e;
    --text: #3d4654;
    --text-2: #6b7380;
    --text-3: #9aa1ad;

    /* 品牌强调色：仅用于价格、按钮、选中态 */
    --accent: #b8860b;
    --accent-dark: #966f09;
    --accent-soft: #d4a843;
    --accent-bg: rgba(184, 134, 11, 0.08);

    /* 兼容旧变量名 */
    --ink-1: #1a1f2e;
    --ink-2: #3d4654;
    --ink-3: #eef0f4;
    --ink-4: #e2e6ef;
    --gold: var(--accent);
    --gold-hi: #e8c56a;
    --gold-mid: var(--accent-soft);
    --gold-lo: var(--accent-dark);

    --purple: #8b6fc0;
    --teal: #1a8f7a;
    --teal-dim: rgba(26, 143, 122, 0.08);
    --ok: #168a62;
    --bad: #d64545;
    --wechat: #07c160;
    --alipay: #1677ff;
    --glow-gold: 0 2px 8px rgba(184, 134, 11, 0.15);
    --shadow: 0 2px 16px rgba(26, 31, 46, 0.06);
    --shadow-lg: 0 6px 24px rgba(26, 31, 46, 0.08);
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
    --r: 10px;
    --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    min-height: 100dvh;
    padding-bottom: calc(92px + var(--safe-b));
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

body:not(:has(.submit-bar)) {
    padding-bottom: calc(16px + var(--safe-b));
}

/* 已移除 trust-strip / site-footer，保留类名兼容旧 HTML */
.trust-strip,
.site-footer { display: none; }

/* ── 背景层（白底轻渐变） ── */
.ambient {
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        radial-gradient(ellipse 100% 60% at 50% -10%, rgba(62, 207, 182, 0.06) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 100% 20%, rgba(196, 157, 255, 0.05) 0%, transparent 45%),
        radial-gradient(ellipse 40% 35% at 0% 80%, rgba(255, 216, 120, 0.06) 0%, transparent 40%),
        linear-gradient(180deg, #ffffff 0%, #f8f9fc 50%, #ffffff 100%);
}

.ambient::after { display: none; }

.ambient__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    animation: orbFloat 12s ease-in-out infinite;
}

.ambient__orb--1 {
    width: 260px;
    height: 260px;
    top: -60px;
    left: -40px;
    background: rgba(62, 207, 182, 0.08);
}

.ambient__orb--2 {
    width: 200px;
    height: 200px;
    top: 25%;
    right: -40px;
    background: rgba(196, 157, 255, 0.06);
    animation-delay: -4s;
}

.ambient__orb--3 {
    width: 160px;
    height: 160px;
    bottom: 15%;
    left: 15%;
    background: rgba(255, 216, 120, 0.07);
    animation-delay: -8s;
}

.ambient__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, transparent, rgba(62, 207, 182, 0.04));
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -16px) scale(1.05); }
}

.stars {
    display: none;
}

.star { display: none; }

body::before { display: none; }

/* ── 顶栏 ── */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: calc(10px + var(--safe-t)) 16px 10px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand__emblem {
    width: 36px;
    height: 36px;
    position: relative;
    flex-shrink: 0;
}

.brand__emblem::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: conic-gradient(from 180deg, var(--gold), var(--teal), var(--purple), var(--gold));
    animation: emblemSpin 8s linear infinite;
    opacity: 0.7;
}

.brand__emblem::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: var(--glow-gold);
}

.brand__emblem span {
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff, var(--bg-muted));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.brand__emblem span::after {
    content: '潮';
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.logo-main {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--heading);
}

.logo-sub {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--text-3);
    text-transform: uppercase;
}

.nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    max-width: 100%;
    padding: 2px 0;
}

.nav::-webkit-scrollbar { display: none; }

@keyframes emblemSpin {
    to { transform: rotate(360deg); }
}

.logo { display: flex; flex-direction: column; gap: 2px; }

.nav a {
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    text-decoration: none;
    white-space: nowrap;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid transparent;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.nav a:hover {
    color: var(--heading);
    background: var(--bg-muted);
    border-color: rgba(0, 0, 0, 0.06);
}

.nav a.active {
    color: var(--accent-dark);
    font-weight: 600;
    background: var(--accent-bg);
    border-color: rgba(184, 134, 11, 0.22);
    box-shadow: none;
}

/* ── 信任条 ── */
.trust-strip {
    border-bottom: 1px solid rgba(180, 140, 60, 0.1);
    background: var(--bg-subtle);
}

.trust-strip__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.trust-item {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trust-item__icon {
    font-style: normal;
    color: var(--accent);
    font-size: 8px;
}

/* ── 流程步骤 ── */
.checkout-flow {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 16px 0;
}

.checkout-flow__list {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 10px 12px;
    background: var(--bg-subtle);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--r);
}

.checkout-flow__item {
    flex: 1;
    max-width: 130px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    position: relative;
}

.checkout-flow__item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    left: calc(50% + 16px);
    width: calc(100% - 32px);
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 216, 120, 0.3), rgba(255, 216, 120, 0.08));
}

.checkout-flow__item span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0 auto 6px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-3);
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

body:has(.role-info.show) .checkout-flow__item[data-step="1"] span,
body:has(.role-info[style*="flex"]) .checkout-flow__item[data-step="1"] span {
    background: rgba(26, 158, 114, 0.12);
    border-color: var(--ok);
    color: var(--ok);
    box-shadow: none;
    font-size: 0;
}

body:has(.role-info.show) .checkout-flow__item[data-step="1"] span::before,
body:has(.role-info[style*="flex"]) .checkout-flow__item[data-step="1"] span::before {
    content: '✓';
    font-size: 12px;
}

body:has(.role-info.show) .checkout-flow__item[data-step="1"],
body:has(.role-info[style*="flex"]) .checkout-flow__item[data-step="1"] { color: var(--ok); }

body:has(.role-info.show) .checkout-flow__item[data-step="2"] span,
body:has(.role-info[style*="flex"]) .checkout-flow__item[data-step="2"] span {
    background: linear-gradient(135deg, #f5e6b8, var(--gold-mid));
    border-color: var(--gold-mid);
    color: #fff;
    box-shadow: var(--glow-gold);
}

body:has(.role-info.show) .checkout-flow__item[data-step="2"],
body:has(.role-info[style*="flex"]) .checkout-flow__item[data-step="2"] { color: var(--accent-dark); font-weight: 600; }

body:has(.product-card.selected) .checkout-flow__item[data-step="2"] span {
    background: rgba(26, 158, 114, 0.12);
    border-color: var(--ok);
    color: var(--ok);
    font-size: 0;
    box-shadow: none;
}

body:has(.product-card.selected) .checkout-flow__item[data-step="2"] span::before {
    content: '✓';
    font-size: 12px;
}

body:has(.product-card.selected) .checkout-flow__item[data-step="3"] span {
    background: linear-gradient(135deg, #f5e6b8, var(--gold-mid));
    border-color: var(--gold-mid);
    color: #fff;
    box-shadow: var(--glow-gold);
}

body:has(.product-card.selected) .checkout-flow__item[data-step="3"] { color: var(--accent-dark); font-weight: 600; }

/* ── KV Banner ── */
.kv-banner,
.page-hero {
    max-width: 960px;
    margin: 0 auto;
    padding: 12px 16px 0;
}

.kv-banner__frame {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--bg-subtle);
    box-shadow: var(--shadow);
}

.kv-banner__frame::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.04) 50%, transparent 65%);
    animation: kvShine 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes kvShine {
    0%, 100% { transform: translateX(-30%); opacity: 0; }
    50% { transform: translateX(30%); opacity: 1; }
}

.kv-banner__mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(62, 207, 182, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(255, 216, 120, 0.12) 0%, transparent 35%);
}

.kv-banner__content {
    position: relative;
    padding: 28px 20px 16px;
    text-align: center;
}

.kv-banner__tag {
    display: inline-block;
    margin-bottom: 10px;
    padding: 3px 12px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--teal);
    border: 1px solid rgba(26, 143, 122, 0.2);
    border-radius: 20px;
    background: var(--teal-dim);
}

.kv-banner__title,
.page-hero__title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--heading);
}

.kv-banner__title::after,
.page-hero__title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    margin: 10px auto 8px;
    background: var(--accent);
    border-radius: 2px;
}

.page-hero__eyebrow {
    font-size: 10px;
    letter-spacing: 0.25em;
    color: var(--text-3);
    margin-bottom: 6px;
}

.ornament-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px auto;
    max-width: 220px;
}

.ornament-line i {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 216, 120, 0.6), transparent);
}

.ornament-line span { font-size: 7px; color: var(--gold); }

.kv-banner__sub,
.page-hero__desc {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-2);
    letter-spacing: 0;
}

.kv-banner__features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--bg-subtle);
}

.kv-banner__features li {
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.kv-banner__features li:last-child { border-right: none; }

.kv-banner__features strong {
    display: block;
    font-size: 15px;
    color: var(--heading);
    font-weight: 600;
}

.kv-banner__features span {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-3);
    margin-top: 2px;
    display: block;
}

/* ── 主内容 ── */
.main {
    max-width: 960px;
    margin: 0 auto;
    padding: 16px;
}

.hidden { display: none !important; }

/* ── 游戏面板 ── */
.card {
    position: relative;
    margin-bottom: 14px;
    padding: 0;
    background: var(--panel);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--accent);
    opacity: 0.85;
    z-index: 1;
}

.card::after { display: none; }

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--bg-subtle);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-step {
    flex-shrink: 0;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border-radius: 6px;
    box-shadow: none;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--heading);
}

.card-subtitle {
    margin-top: 3px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-2);
}

.card > .role-state,
.card > .role-info,
.card > .role-form,
.card > .verify-btn,
.card > .product-shelf,
.card > .login-shelf,
.card > .reward-shelf,
.card > .payment-methods,
.card > .pay-security,
.card > .moon-container {
    margin: 0 16px 16px;
}

.card > .verify-btn { margin-top: 0; width: calc(100% - 32px); }

.card .card-header + .role-state,
.card .card-header + .role-info,
.card .card-header + .role-form {
    margin-top: 16px;
}

/* ── 角色 ── */
.role-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.input-group { position: relative; }

.input-group input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

.input-group input::placeholder { color: var(--text-3); }

.card-icon {
    width: 28px;
    height: 28px;
    display: none;
}

.card-title-wrap { flex: 1; min-width: 0; }

.input-group label {
    position: absolute;
    top: -8px;
    left: 10px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-2);
    background: var(--panel);
}

.verify-btn {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    color: #fff;
    cursor: pointer;
    background: var(--accent);
    border: 1px solid var(--accent-dark);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.25);
    transition: background 0.15s, transform 0.1s;
}

.verify-btn:hover:not(:disabled) { background: var(--accent-dark); }
.verify-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 4px rgba(184, 134, 11, 0.2); }
.verify-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.role-state {
    padding: 36px 16px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.card:has(.role-info.show) .role-state,
.card:has(.role-info[style*="flex"]) .role-state { display: none; }

.role-state__ring {
    width: 32px;
    height: 32px;
    margin: 0 auto 14px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.role-state__title { font-size: 15px; font-weight: 600; color: var(--heading); }
.role-state__desc { margin-top: 8px; font-size: 13px; font-weight: 400; color: var(--text-2); line-height: 1.6; }

.role-info {
    display: none;
    padding: 16px;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    position: relative;
}

.role-info.show { display: block; }

.role-info.error {
    border-color: var(--bad);
    background: rgba(255, 112, 112, 0.08);
}

.role-info.show::before,
.role-info[style*="flex"]::before {
    content: '已验证';
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: var(--ok);
    border-radius: 20px;
    box-shadow: none;
}

.role-avatar {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(0, 0, 0, 0.08);
    box-shadow: none;
}

.role-info-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.role-details {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 16px;
}

.role-name {
    grid-column: 1 / -1;
    font-size: 17px;
    font-weight: 600;
    color: var(--heading);
}

.role-server, .role-level, .server-name {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-2);
}

/* ── 商品货架 ── */
.product-shelf,
.login-shelf,
.reward-shelf {
    width: 100%;
}

.product-shelf__hint {
    margin: 0 0 10px;
    padding: 0 4px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-3);
    text-align: center;
    line-height: 1.5;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    cursor: pointer;
    padding: 8px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.product-card:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .product-card:hover {
        border-color: rgba(184, 134, 11, 0.35);
        box-shadow: var(--shadow);
    }
}

.product-card.selected {
    border-color: var(--accent);
    background: var(--accent-bg);
    box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.15);
}

.product-card.selected::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(184, 134, 11, 0.35);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    background: var(--bg-subtle);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.product-image img {
    max-width: 78%;
    max-height: 78%;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
}

.product-name {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--heading);
}

.product-description {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-3);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    margin-top: auto;
    padding-top: 8px;
}

.product-price {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.product-original {
    display: inline-block;
    font-size: 10px;
    font-weight: 400;
    color: var(--text-3);
    text-decoration: line-through;
    margin-top: 2px;
}

.product-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #e04040, #a02020);
    border-radius: 4px;
    z-index: 2;
    line-height: 1.2;
}

.hidden-item { display: none; }

.moon-container {
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: center;
}

.moon-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 36px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-2);
    background: var(--bg-subtle);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.moon-toggle:hover,
.moon-toggle:focus-visible {
    color: var(--accent-dark);
    border-color: rgba(184, 134, 11, 0.35);
    background: var(--accent-bg);
    outline: none;
}

/* ── 支付 ── */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    transition: all 0.25s;
}

.payment-option:hover {
    border-color: rgba(255, 216, 120, 0.25);
}

.payment-option.selected {
    border-color: var(--accent);
    background: var(--accent-bg);
    box-shadow: none;
}

.payment-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    box-shadow: none;
}

.payment-icon--wechat { background: var(--wechat); }
.payment-icon--alipay { background: var(--alipay); }

.payment-name { font-size: 14px; font-weight: 600; color: var(--heading); }
.payment-desc { font-size: 12px; font-weight: 400; color: var(--text-3); margin-top: 2px; }

.payment-check {
    width: 20px;
    height: 20px;
    margin-left: auto;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-option.selected .payment-check {
    background: var(--accent);
    border-color: var(--accent);
}

.payment-check::after {
    content: '✓';
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    display: none;
}

.payment-option.selected .payment-check::after { display: block; }

.pay-security {
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-2);
    background: var(--teal-dim);
    border: 1px solid rgba(26, 143, 122, 0.15);
    border-radius: 8px;
    line-height: 1.5;
}

.pay-security strong { color: var(--teal); font-weight: 600; }

/* ── 底部结算 ── */
.submit-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    padding: 12px 16px calc(12px + var(--safe-b));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.submit-bar::before { display: none; }

.submit-bar-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.total-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0;
}

.total-amount {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.total-note { font-size: 11px; font-weight: 400; color: var(--text-3); margin-top: 2px; }

.submit-bar__secure {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-3);
}

.submit-bar__secure svg {
    width: 11px;
    height: 11px;
    fill: var(--teal);
}

.submit-btn {
    min-width: 130px;
    height: 48px;
    padding: 0 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--accent);
    border: 1px solid var(--accent-dark);
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.25);
    transition: background 0.15s, transform 0.1s;
}

.submit-btn:hover:not(:disabled) { background: var(--accent-dark); }
.submit-btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 4px rgba(184, 134, 11, 0.2); }
.submit-btn:disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.3); }

.loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(10, 10, 26, 0.2);
    border-top-color: var(--ink-1);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: -2px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── 弹窗 ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    padding: 16px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: 100%;
    max-width: 360px;
    max-height: 85dvh;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(180, 140, 60, 0.25);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 216, 120, 0.12);
    background: rgba(255, 216, 120, 0.06);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--heading);
    letter-spacing: 0;
}

.modal-close {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--surface);
    color: var(--text-3);
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
}

.modal-close:hover { color: var(--bad); border-color: var(--bad); }

.modal-body {
    padding: 18px;
    max-height: 50vh;
    overflow-y: auto;
}

.modal-image {
    height: 110px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    background: var(--surface);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 10px;
}

.modal-body p {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
    white-space: pre-wrap;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 0 18px 18px;
}

.modal-cancel, .modal-confirm {
    flex: 1;
    height: 42px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
}

.modal-cancel {
    background: var(--surface);
    color: var(--text-2);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-confirm {
    color: #fff;
    background: var(--accent);
    box-shadow: none;
}

/* ── 福利模块 ── */
.section-title { display: flex; align-items: center; margin-bottom: 10px; }
.section-title .num {
    width: 22px; height: 22px;
    margin-right: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #fff;
    background: var(--accent);
    border-radius: 6px;
}
.section-title .text { font-size: 15px; font-weight: 600; color: var(--heading); }

.recharge-card .charge-title, .level-card .level-title {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--heading);
}

.recharge-card .reward-text, .level-card .reward-text {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.claim-btn {
    min-width: 64px;
    height: 34px;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: var(--accent);
    box-shadow: none;
    flex-shrink: 0;
}

.recharge-card, .level-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s;
}

.recharge-card:hover, .level-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
}

.recharge-card .left, .level-card .left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.claim-btn:disabled {
    background: var(--surface-2);
    color: var(--text-3);
    box-shadow: none;
    cursor: not-allowed;
}

.recharge-grid, .level-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-shelf {
    overflow: hidden;
}

.login-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.login-grid::-webkit-scrollbar {
    display: none;
}

.login-card {
    position: relative;
    flex: 0 0 88px;
    scroll-snap-align: start;
    padding: 10px 6px;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card.claimable {
    border-color: var(--ok);
    box-shadow: 0 0 0 2px rgba(26, 158, 114, 0.12);
    background: rgba(26, 158, 114, 0.06);
}

.login-card.claimed { opacity: 0.5; }
.login-card.not-reached { border-color: rgba(255, 112, 112, 0.4); }

.login-card .day {
    width: 24px; height: 24px;
    margin: 0 auto 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600;
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: none;
}

.login-card.claimable .day {
    background: var(--ok);
    box-shadow: none;
}

.login-card.claimed .day { background: var(--text-3); color: #fff; box-shadow: none; }
.login-card.not-reached .day { background: var(--bad); color: #fff; box-shadow: none; }

.login-card .rewards { font-size: 10px; font-weight: 400; color: var(--text-2); line-height: 1.4; }
.login-card .claim-btn { width: 100%; height: 26px; min-width: 0; margin-top: 6px; font-size: 10px; }

.login-card .claimed-badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 8px; font-weight: 800;
    color: var(--ink-1);
    background: var(--ok);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(94, 228, 176, 0.5);
}

/* ── 页脚 ── */
.site-footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 16px calc(100px + var(--safe-b));
    text-align: center;
}

body:not(:has(.submit-bar)) .site-footer {
    padding-bottom: 28px;
}

.site-footer p {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-3);
    line-height: 1.7;
}

.site-footer a {
    color: var(--text-2);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.site-footer a:hover { color: var(--accent); }

.site-footer__brand {
    margin-bottom: 6px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    color: var(--text-3);
}

/* ── 响应式 ── */
@media (min-width: 481px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .product-card { padding: 10px; }
    .product-name { font-size: 13px; }
    .product-price { font-size: 17px; }
}

@media (min-width: 769px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    }

    .login-grid {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        overflow: visible;
        scroll-snap-type: none;
    }

    .login-card {
        flex: none;
    }
}

@media (max-width: 768px) {
    .header-content { flex-direction: column; align-items: stretch; }
    .brand { justify-content: center; }
    .nav { justify-content: center; }
    .total-note, .submit-bar__secure { display: none; }
    .recharge-card .left, .level-card .left { flex-direction: column; align-items: flex-start; gap: 4px; }
    .recharge-card .reward-text, .level-card .reward-text { white-space: normal; }
    .role-details { grid-template-columns: 1fr; }
    .kv-banner__title { font-size: 24px; }
}

@media (max-width: 480px) {
    .main { padding: 12px; }
    .role-form { grid-template-columns: 1fr; }
    .payment-methods { grid-template-columns: 1fr; }
    .submit-bar-content { gap: 10px; }
    .total-amount { font-size: 22px; }
    .submit-btn { min-width: 108px; padding: 0 18px; font-size: 13px; }

    .product-shelf__hint { font-size: 11px; margin-bottom: 8px; }
    .product-grid { gap: 8px; }
    .product-card { padding: 7px; border-radius: 10px; }
    .product-image { font-size: 30px; margin-bottom: 6px; border-radius: 8px; }
    .product-name { font-size: 11px; min-height: 2.4em; }
    .product-price { font-size: 15px; }

    .login-card { flex: 0 0 80px; padding: 8px 4px; }

    .recharge-card,
    .level-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .recharge-card .claim-btn,
    .level-card .claim-btn {
        width: 100%;
        height: 40px;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    body { padding-bottom: calc(72px + var(--safe-b)); }
    .header { padding-top: calc(4px + var(--safe-t)); padding-bottom: 4px; }
    .header-content { flex-direction: row; }
    .brand { justify-content: flex-start; }
    .logo-sub { display: none; }
    .checkout-flow { padding-top: 6px; }
    .kv-banner, .page-hero { padding-top: 8px; }
    .kv-banner__content { padding: 14px 16px 10px; }
    .kv-banner__tag, .kv-banner__sub { display: none; }
    .kv-banner__title { font-size: 20px; }
    .main { padding: 8px 12px; }

    .product-shelf__hint { margin-bottom: 6px; font-size: 11px; }
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }
    .product-card { padding: 6px; }
    .product-image { font-size: 26px; margin-bottom: 4px; }
    .product-name { font-size: 10px; min-height: 2.2em; -webkit-line-clamp: 2; }
    .product-description { font-size: 9px; -webkit-line-clamp: 1; }
    .product-price { font-size: 13px; }
    .product-footer { padding-top: 4px; }

    .login-grid {
        display: grid;
        grid-template-columns: repeat(7, minmax(0, 1fr));
        overflow: visible;
    }
    .login-card { flex: none; padding: 6px 2px; }
    .login-card .rewards { font-size: 9px; }

    .recharge-card,
    .level-card {
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
    }
    .recharge-card .claim-btn,
    .level-card .claim-btn {
        width: auto;
        height: 34px;
    }
}

@media (orientation: landscape) and (min-width: 640px) and (max-height: 520px) {
    .product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
