:root {
    --primary: #078744;
    --primary-light: rgba(8, 191, 98, .08);
    --primary-border: rgba(8, 191, 98, .24);
    --text: #202124;
    --text-light: #686b70;
    --text-muted: #9a9da3;
    --border: rgba(60, 60, 67, .10);
    --bg: #fff;
}

html, body { background: #fff; }
body { min-height: 100dvh; }
/* 固定结算栏不能成为整页动画的子坐标系，兼容旧版共享动效缓存。 */
html body.subscription-page { animation: none; transform: none; }
.container { max-width: 520px; min-height: 100dvh; padding-bottom: calc(var(--checkout-height, calc(120px + env(safe-area-inset-bottom))) + 20px); background: #fff; }
html { scroll-padding-bottom: calc(var(--checkout-height, 120px) + 20px); }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #078744; outline-offset: 4px; }

.subscription-header {
    min-height: 56px;
    padding: env(safe-area-inset-top) 16px 0;
    border-bottom: 0;
    background: rgba(255,255,255,.82);
    -webkit-backdrop-filter: blur(22px) saturate(135%);
    backdrop-filter: blur(22px) saturate(135%);
}
.subscription-header .header-title { position: absolute; left: 50%; transform: translateX(-50%); font-size: 17px; }
.header-back { width: 25px; height: 25px; }
.header-service { min-width: 44px; height: 44px; border: 0; color: #686b70; background: transparent; font-size: 14px; }

.recharge-intro { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 30px 22px 26px; }
.recharge-intro-copy { min-width: 0; }
.companion-art { width: 112px; max-width: 30%; height: auto; flex-shrink: 0; color: #78bb92; }
.recharge-intro h1 { margin: 0 0 9px; color: #202124; font-size: clamp(22px, 5.6vw, 27px); line-height: 1.35; letter-spacing: -.025em; }
.recharge-intro p { color: #686b70; font-size: 13px; }
.recharge-note { display: flex; align-items: center; gap: 0; margin: 0 22px 27px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); color: #777b81; font-size: 12px; }
.recharge-note span { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; white-space: nowrap; }
.recharge-note span:first-child { flex: 1.35; }
.recharge-note svg { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.recharge-note span + span { border-left: 1px solid var(--border); }

.tab-bar.recharge-section-title { display: block; margin: 0; padding: 0 22px 11px; background: transparent; }
.recharge-section-title .tab-item { padding: 0; color: #25272a; background: transparent!important; box-shadow: none!important; text-align: left; font-size: 15px; font-weight: 680; pointer-events: none; }
.plan-list { margin: 0; padding: 0 22px 12px; }
.plan-item { position: relative; width: 100%; min-height: 94px; margin: 0 0 8px; padding: 15px 14px; display: flex; align-items: center; gap: 18px; border: 1px solid #e0e3e6; border-radius: 7px; background: #fff; text-align: left; font: inherit; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.plan-item:first-child { border-top: 1px solid #e0e3e6; }
.plan-item:hover { border-color: var(--border); background: #fafcfb; }
.plan-item.selected { border-color: var(--primary); background: #f2f8f4; box-shadow: none; }
.plan-main { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-header { min-width: 0; margin: 0; }
.plan-name { margin-bottom: 5px; color: #25272a; font-size: 16px; font-weight: 650; }
.plan-desc { max-width: 230px; margin: 0; color: #74787e; font-size: 12px; line-height: 1.6; white-space: normal; overflow-wrap: anywhere; }
.plan-price-row { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 3px; margin: 0; }
.plan-current-price { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.plan-price { color: #25272a; font-size: 22px; font-weight: 720; letter-spacing: -.03em; }
.plan-price-unit { color: #96999e; font-size: 11px; }
.plan-item.selected .plan-price { color: var(--primary); }
.plan-original-price { position: static; color: #92979e; font-size: 11px; text-decoration: line-through; }
.plan-select { position: static; flex: 0 0 22px; width: 22px; height: 22px; border: 1.5px solid #c9cbd0; }
.plan-select::after { width: 6px; height: 10px; margin-top: -3px; border: solid #fff; border-width: 0 2px 2px 0; border-radius: 0; background: transparent; transform: rotate(45deg); }
.plan-item.selected .plan-select { border-color: var(--primary); background: var(--primary); }
.plan-badge { position: static; align-self: flex-end; padding: 2px 6px; border-radius: 5px; font-size: 10px; line-height: 1.4; animation: none!important; }
.plan-badge.recommend { color: #078f4c; background: #eaf8f0; }
.plan-badge.best, .plan-badge.discount { color: #a96d18; background: #fff4df; }

.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; width: 100%; max-width: 520px; margin: 0 auto; padding: 16px max(22px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left)); border: 0; border-top: 1px solid #dedee3; border-radius: 0; background: #fff; box-shadow: none; transform: none; }
.bottom-bar-inner { max-width: 488px; }
.checkout-summary { display: flex; align-items: center; gap: 12px; }
.checkout-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.checkout-copy span { overflow: hidden; color: #686b70; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.checkout-copy strong { margin-top: 5px; color: #25272a; font-size: 25px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.subscribe-btn { flex: 0 0 auto; width: clamp(120px, 30vw, 150px); min-height: 44px; height: auto; padding: 10px 16px; border: 0; border-radius: 4px; color: #fff; background: #008642; box-shadow: none; font-size: 17px; font-weight: 600; }
.subscribe-btn:active { transform: none; background: #06ad54; }
.footer-text { margin-top: 10px; color: #74787e; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.footer-text a { color: #555b62; }

@media (min-width: 768px) {
    .container { margin: 0 auto; min-height: 100dvh; border-radius: 0; box-shadow: 0 0 0 1px rgba(60,60,67,.08); }
    .bottom-bar-inner { max-width: 488px; }
}

@media (max-width: 360px) {
    .recharge-intro, .plan-list { padding-left: 17px; padding-right: 17px; }
    .recharge-note { margin-left: 17px; margin-right: 17px; }
    .tab-bar.recharge-section-title { padding-left: 17px; padding-right: 17px; }
    .subscribe-btn { width: 140px; }
    .plan-item { gap: 9px; padding: 14px 11px; }
    .plan-main { gap: 8px; }
    .plan-name { font-size: 15px; }
    .plan-price { font-size: 20px; }
    .companion-art { width: 78px; }
    .recharge-note { font-size: 10px; }
    .recharge-note span { gap: 5px; }
}

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