/* 购买页面（照小鹅通店铺页的样子：浅灰底、白色卡片、红色价格、橙红色"立即抢购"、蓝色登录按钮；2026-11-20） */
:root {
  --bg: #f5f6f7; --card: #fff; --text: #1f2329; --text2: #8a8f99; --line: #eef0f2;
  --red: #ff3b30; --red2: #ff5a3c; --pink: #fff1f0; --orange1: #ff7a00; --orange2: #ff3d1e;
  --blue: #1677ff; --radius: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; color: inherit; cursor: pointer; padding: 0; }
input { font: inherit; }
img { display: block; max-width: 100%; }
.loading { padding: 120px 0; text-align: center; color: var(--text2); }
.page { min-height: 100vh; padding-bottom: calc(70px + var(--safe-b)); }
.page.nobar { padding-bottom: 24px; }
.muted { color: var(--text2); }
.empty { padding: 60px 20px; text-align: center; color: var(--text2); font-size: 14px; }
.wrap { max-width: 640px; margin: 0 auto; }

/* 顶部搜索 */
.search { padding: 10px 12px 8px; }
.search input { width: 100%; height: 36px; border: 0; border-radius: 18px; background: #eceef1; padding: 0 14px 0 38px; color: var(--text); outline: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a8f99' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.5-3.5'/></svg>");
  background-repeat: no-repeat; background-position: 13px center; }
.search input::placeholder { color: #a6abb3; text-align: center; }
.search input:focus::placeholder { color: transparent; }

/* 顶上的大图、小助理微信卡片 */
.banner { margin: 2px 12px 10px; border-radius: var(--radius); overflow: hidden; background: #fff; }
.banner img { width: 100%; }
.wx { margin: 0 12px 14px; background: #fff; border-radius: var(--radius); display: flex; align-items: center; padding: 12px 10px 12px 12px; gap: 10px; }
.wx .ic { width: 40px; height: 40px; border-radius: 50%; background: #07c160; display: grid; place-items: center; flex: none; }
.wx .ic svg { width: 24px; height: 24px; }
.wx .t { flex: 1; min-width: 0; }
.wx .t b { display: block; font-size: 16px; }
.wx .t span { display: block; font-size: 12.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx .go { background: var(--blue); color: #fff; border-radius: 18px; padding: 7px 16px; font-size: 14px; font-weight: 600; flex: none; }
.wx .x { width: 28px; height: 28px; color: #b0b4bb; font-size: 20px; line-height: 28px; text-align: center; flex: none; }

/* 区块标题 */
.sec { margin: 6px 0 4px; }
.sec-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 10px; }
.sec-h h2 { margin: 0; font-size: 19px; font-weight: 700; }
.sec-h a { font-size: 13.5px; color: var(--text2); }

/* 两列的课程卡片（限时折扣、精品课程） */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px; }
.gcard { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #4b7bf5, #7aa0ff); overflow: hidden; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px 12px; color: #fff; font-weight: 800; font-size: 17px; text-align: center; line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0,0,0,.18); background: linear-gradient(135deg, #4b7bf5, #7aa0ff); }
.ph.c1 { background: linear-gradient(135deg, #7a6ad8, #a093f0); }
.ph.c2 { background: linear-gradient(135deg, #de6a5e, #f2958a); }
.ribbon { position: absolute; left: 0; top: 0; background: linear-gradient(90deg, #ff3d1e, #ff7a00); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px 2px 7px; border-bottom-right-radius: 10px; }
.ctag { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.42); color: #fff; font-size: 11.5px; padding: 1px 6px; border-radius: 5px; }
.gbody { padding: 8px 9px 10px; display: flex; flex-direction: column; flex: 1; }
.gtitle { font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.zhe { display: inline-block; color: var(--red); background: var(--pink); border-radius: 4px; font-size: 12px; font-weight: 700; padding: 0 4px; margin-right: 5px; line-height: 18px; vertical-align: 2px; }
.cd { color: var(--red); font-size: 12.5px; margin-top: 4px; }
.pbox { margin-top: auto; padding-top: 8px; }
.pbox > div { background: var(--pink); border-radius: 8px; padding: 6px 8px; display: flex; align-items: baseline; gap: 6px; }
.price { color: var(--red); font-weight: 800; font-size: 20px; }
.price small { font-size: 12px; margin-right: 1px; }
.strike { color: #b0b4bb; font-size: 12.5px; text-decoration: line-through; }
.owned { color: #07a35a; font-size: 13px; font-weight: 700; }
.free { color: #ff6a00; font-weight: 800; font-size: 17px; }

/* 一行的课程（试听课程、学习中心） */
.rows { padding: 0 12px; display: flex; flex-direction: column; gap: 10px; }
.rcard { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; gap: 10px; }
.rcard .cover { width: 42%; flex: none; border-radius: 0; }
.rcard .rb { padding: 9px 10px 9px 0; display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rcard .rb b { font-size: 15px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcard .rb .bottom { margin-top: auto; font-size: 13px; }

.foot { text-align: center; color: #6b7079; font-size: 13px; padding: 22px 0 10px; }
.foot a { padding: 0 9px; border-left: 1px solid #d6d9de; }
.foot a:first-child { border-left: 0; }

/* 底部三个页签 */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; display: flex; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); z-index: 20; }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 6px 0 5px; font-size: 11.5px; color: #43474e; }
.tabs a svg { width: 24px; height: 24px; margin-bottom: 1px; }
.tabs a.on { color: var(--blue); }

/* 课程详情 */
.topbar { position: sticky; top: 0; z-index: 15; background: #fff; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, #3e6ff2, #5c88ff); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.av img { width: 100%; height: 100%; object-fit: cover; }
.topbar .nm { flex: 1; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .ib { width: 32px; height: 32px; display: grid; place-items: center; }
.topbar .ib svg { width: 22px; height: 22px; }
.dcover { position: relative; aspect-ratio: 16 / 9; background: #e9ecf1; }
.dcover img { width: 100%; height: 100%; object-fit: cover; }
.dcover .ph { font-size: 28px; }
.dcover .valid { position: absolute; left: 0; bottom: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 12.5px; padding: 3px 10px; border-top-right-radius: 10px; }
.band { background: linear-gradient(100deg, #ff3b30, #ff7a45); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; }
.band .l .p { font-size: 30px; font-weight: 800; line-height: 1.1; }
.band .l .p small { font-size: 15px; margin-right: 2px; }
.band .l .s { font-size: 13px; opacity: .85; text-decoration: line-through; }
.band .r { text-align: right; }
.band .r b { display: block; font-size: 19px; font-style: italic; letter-spacing: 1px; }
.band .r .cdb { font-size: 12.5px; }
.band .r .cdb i { font-style: normal; display: inline-block; background: #fff; color: var(--red); border-radius: 3px; padding: 0 3px; margin: 0 2px; font-weight: 700; }
.pline { background: #fff; padding: 12px 12px 0; display: flex; align-items: baseline; gap: 8px; }
.pline .price { font-size: 26px; }
.dtitle { background: #fff; margin: 0; padding: 10px 12px 12px; font-size: 18px; font-weight: 700; line-height: 1.4; }
.dsub { background: #fff; padding: 0 12px 12px; margin-top: -6px; font-size: 13px; color: var(--text2); }
.shoprow { background: #fff; margin-top: 10px; display: flex; align-items: center; gap: 10px; padding: 12px; }
.shoprow .av { width: 40px; height: 40px; font-size: 18px; }
.shoprow b { flex: 1; font-size: 15.5px; }
.shoprow a { border: 1px solid var(--red); color: var(--red); border-radius: 6px; padding: 4px 12px; font-size: 13.5px; }
.dtabs { position: sticky; top: 47px; z-index: 10; background: #fff; margin-top: 10px; display: flex; gap: 26px; padding: 10px 14px 0; border-bottom: 1px solid var(--line); }
.dtabs button { font-size: 15.5px; color: var(--text2); padding-bottom: 8px; border-bottom: 3px solid transparent; }
.dtabs button.on { color: var(--text); font-weight: 700; border-color: var(--blue); }
.dpanel { background: #fff; padding: 14px; min-height: 260px; }
.intro { white-space: pre-wrap; word-break: break-word; font-size: 15.5px; line-height: 1.75; }
.subs-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; font-size: 16px; }
.subs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.subs::-webkit-scrollbar { display: none; }
.sub { flex: none; width: 62%; border-radius: 10px; padding: 12px; background: #2b2f36; color: #fff; text-align: left; }
.sub.on { background: linear-gradient(135deg, #1f2329, #3a4250); outline: 2px solid var(--blue); }
.sub b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; line-height: 1.35; min-height: 40px; }
.sub span { font-size: 12.5px; opacity: .8; }
.chs { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.ch { background: #f4f5f7; border-radius: 10px; }
.ch > button { width: 100%; text-align: left; display: flex; align-items: center; gap: 6px; padding: 12px; font-weight: 600; font-size: 15px; }
.ch > button span { flex: 1; }
.ch > button em { font-style: normal; color: var(--text2); font-weight: 400; font-size: 13px; }
.ch > button i { font-style: normal; color: var(--text2); transition: transform .2s; }
.ch.open > button i { transform: rotate(180deg); }
.ch ol { margin: 0; padding: 0 12px 10px 32px; font-size: 14px; color: #3c4047; }
.ch ol li { padding: 5px 0; border-top: 1px solid #e8eaed; }
.ch ol li small { color: var(--text2); margin-left: 6px; }

/* 底部购买栏 */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 8px 12px calc(8px + var(--safe-b)); }
.bar .kf { display: flex; flex-direction: column; align-items: center; font-size: 11.5px; color: #43474e; width: 42px; flex: none; }
.bar .kf svg { width: 24px; height: 24px; }
.bar .buy { flex: 1; height: 44px; border-radius: 22px; background: linear-gradient(90deg, var(--orange1), var(--orange2)); color: #fff; font-size: 16.5px; font-weight: 700; }
.bar .buy.gray { background: #c9ccd1; }
.bar .buy.green { background: linear-gradient(90deg, #12b76a, #07a35a); }
.bar .sum { flex: 1; font-size: 14px; }
.bar .sum .price { font-size: 22px; }
.bar .submit { height: 44px; border-radius: 22px; padding: 0 28px; background: linear-gradient(90deg, var(--orange1), var(--orange2)); color: #fff; font-size: 16px; font-weight: 700; }
.bar .submit:disabled { opacity: .55; }

/* 普通页面的顶栏（返回 + 标题） */
.navbar { position: sticky; top: 0; z-index: 15; background: #fff; height: 46px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line); font-size: 17px; font-weight: 600; }
.navbar .back { position: absolute; left: 4px; top: 0; width: 44px; height: 46px; display: grid; place-items: center; font-size: 26px; font-weight: 400; color: #333; }
.box { background: #fff; border-radius: var(--radius); margin: 10px 12px; padding: 12px; }
.ocard { display: flex; gap: 10px; }
.ocard .cover { width: 120px; flex: none; border-radius: 8px; }
.ocard b { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kv { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 15px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv .v { color: #333; }
.kv .v.red { color: var(--red); font-weight: 700; }
.kv button.v { color: var(--red); }
.kv button.v.none { color: var(--text2); }
.agree { display: flex; align-items: flex-start; gap: 6px; margin: 12px 14px; font-size: 13px; color: var(--text2); }
.agree input { margin: 2px 0 0; width: 15px; height: 15px; accent-color: var(--blue); flex: none; }
.agree a { color: var(--blue); }

/* 登录（照小鹅通的"验证码登录"） */
.login { min-height: 100vh; background: linear-gradient(180deg, #eef3ff, #f6f7fb 50%); padding: 70px 18px 30px; }
.login .lc { max-width: 420px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 30px 22px 26px; box-shadow: 0 6px 24px rgba(30, 60, 140, .06); }
.login h1 { margin: 0 0 6px; font-size: 24px; }
.login p.lsub { margin: 0 0 22px; font-size: 14px; color: var(--text2); }
.field { display: flex; align-items: center; border: 1px solid #e3e6eb; border-radius: 10px; height: 48px; padding: 0 12px; margin-bottom: 14px; }
.field input { flex: 1; border: 0; outline: none; height: 100%; font-size: 16px; background: transparent; min-width: 0; }
.field button { color: var(--blue); font-size: 15px; white-space: nowrap; }
.field button:disabled { color: #a6abb3; }
.btn { width: 100%; height: 46px; border-radius: 10px; background: var(--blue); color: #fff; font-size: 17px; font-weight: 600; margin-top: 6px; }
.btn:disabled { opacity: .6; }
.btn.line { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.devcode { margin-top: 10px; font-size: 13px; color: #c27c00; }

/* 结果、我的 */
.result { text-align: center; padding: 50px 20px 20px; }
.result .ok { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: #12b76a; color: #fff; display: grid; place-items: center; font-size: 36px; }
.result .wait { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; border: 4px solid #dfe3ea; border-top-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result h2 { margin: 0 0 8px; font-size: 21px; }
.result p { margin: 0 0 6px; color: #555b64; font-size: 14.5px; }
.me-h { background: linear-gradient(135deg, #3e6ff2, #6d93ff); color: #fff; padding: 34px 18px 26px; display: flex; align-items: center; gap: 12px; }
.me-h .av { width: 54px; height: 54px; background: rgba(255,255,255,.25); font-size: 22px; }
.me-h b { font-size: 19px; display: block; }
.me-h span { font-size: 13px; opacity: .85; }
.list { background: #fff; border-radius: var(--radius); margin: 12px; overflow: hidden; }
.list a, .list button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px; font-size: 15.5px; text-align: left; }
.list a + a, .list a + button, .list button + a { border-top: 1px solid var(--line); }
.list i { font-style: normal; color: #b0b4bb; }
.ocardx { background: #fff; border-radius: var(--radius); margin: 10px 12px; padding: 12px; }
.ocardx .top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text2); margin-bottom: 6px; }
.ocardx .st { color: var(--red); }
.ocardx .st.paid { color: #07a35a; }
.ocardx b { display: block; font-size: 15px; margin-bottom: 6px; }
.ocardx .bt { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.ocardx .bt .ops { display: flex; gap: 8px; }
.ocardx .bt .ops button { border: 1px solid #d6d9de; border-radius: 15px; padding: 3px 12px; font-size: 13px; }
.ocardx .bt .ops button.pay { border-color: var(--red); color: var(--red); }
.cpn { display: flex; margin: 10px 12px; background: #fff; border-radius: var(--radius); overflow: hidden; }
.cpn .l { width: 110px; flex: none; background: linear-gradient(135deg, #ff5a3c, #ff8a3d); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px 6px; text-align: center; }
.cpn .l b { font-size: 21px; line-height: 1.2; }
.cpn .l span { font-size: 11.5px; opacity: .9; }
.cpn .r { padding: 12px; flex: 1; min-width: 0; }
.cpn .r b { display: block; font-size: 15px; }
.cpn .r span { font-size: 12.5px; color: var(--text2); }
.cpn.off .l { background: #c9ccd1; }
.cpn.pick { cursor: pointer; }
.cpn.pick.on { outline: 2px solid var(--red); }
.appdl { text-align: left; margin: 12px; border-radius: var(--radius); background: linear-gradient(135deg, #3e6ff2, #5c88ff); color: #fff; padding: 16px; display: flex; align-items: center; gap: 12px; }
.appdl .lg { width: 48px; height: 48px; border-radius: 12px; background: #fff; color: #3e6ff2; display: grid; place-items: center; font-size: 26px; font-weight: 800; flex: none; }
.appdl div { flex: 1; font-size: 13px; }
.appdl div b { display: block; font-size: 16px; }
.appdl a { background: #fff; color: #3e6ff2; border-radius: 16px; padding: 6px 12px; font-weight: 700; font-size: 13.5px; flex: none; }

/* 弹层 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease-out; }
.sheet { width: 100%; max-width: 640px; max-height: 82vh; overflow-y: auto; background: #fff; border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + var(--safe-b)); animation: up .24s cubic-bezier(.2,.9,.3,1.1); }
.sheet h3 { margin: 0 0 12px; text-align: center; font-size: 17px; }
.sheet .txt { white-space: pre-wrap; font-size: 14.5px; line-height: 1.7; color: #3c4047; }
.sheet .qr { width: 200px; margin: 6px auto 8px; border-radius: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
#toast { position: fixed; left: 50%; top: 42%; transform: translateX(-50%); background: rgba(0,0,0,.78); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14.5px; max-width: 80vw; text-align: center; z-index: 100; display: none; }
#toast.on { display: block; animation: fade .15s; }
