* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f6f8; color: #222; }
.topbar { background: #07c160; color: #fff; padding: 14px 16px; font-size: 18px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.topbar .sub { font-size: 12px; font-weight: 400; opacity: .9; }
.nav { display: flex; background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; }
.nav a { flex: 1; text-align: center; padding: 12px 0; font-size: 15px; color: #666; text-decoration: none; border-bottom: 2px solid transparent; }
.nav a.active { color: #07c160; border-bottom-color: #07c160; font-weight: 600; }
.container { max-width: 720px; margin: 0 auto; padding: 16px; }
.section { display: none; }
.section.active { display: block; }
.card { background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); cursor: pointer; transition: .15s; }
.card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.1); }
.card .row { display: flex; gap: 12px; }
.card img { width: 96px; height: 60px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #eee; }
.card .main { flex: 1; min-width: 0; }
.card .title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.card .meta { font-size: 12px; color: #888; margin-bottom: 4px; }
.card .price { color: #fa5151; font-weight: 700; font-size: 15px; }
.card .price small { color: #aaa; font-weight: 400; text-decoration: line-through; margin-left: 6px; font-size: 12px; }
.badge { display: inline-block; background: #07c160; color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.badge.preview { background: #ff9700; }
.badge.coupon { background: #fa5151; }
.badge.lock { background: #c8c9cc; }
.detail { background: #fff; border-radius: 10px; padding: 16px; }
.detail h2 { font-size: 20px; margin-bottom: 8px; }
.detail .cover { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; margin: 8px 0; background: #eee; }
.chapter { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; cursor: pointer; }
.chapter:last-child { border-bottom: none; }
.chapter .free { color: #ff9700; font-size: 12px; }
.chapter-video { width: 100%; border-radius: 8px; background: #000; margin: 10px 0; }
.chapter-img { width: 100%; border-radius: 8px; margin: 8px 0; display: block; background: #eee; }
.doc-frame { width: 100%; height: 62vh; border: 1px solid #eee; border-radius: 8px; margin: 10px 0; }
.btn { display: block; width: 100%; background: #07c160; color: #fff; border: none; padding: 13px; border-radius: 8px; font-size: 16px; margin-top: 14px; cursor: pointer; }
.btn.ghost { background: #fff; color: #07c160; border: 1px solid #07c160; }
.btn:disabled { opacity: .6; }
.field { margin: 10px 0; }
.field label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.field input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; box-sizing: border-box; }
.summary-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-line.total { font-weight: 700; font-size: 16px; border-top: 1px solid #eee; margin-top: 6px; padding-top: 10px; }
.empty { text-align: center; color: #aaa; padding: 40px 0; font-size: 14px; }
.tag { display:inline-block; background:#f2f2f2; color:#666; font-size:12px; padding:2px 8px; border-radius:4px; margin-right:6px; }
.stat { display:flex; gap:10px; margin-bottom:12px; }
.stat .box { flex:1; background:#fff; border-radius:10px; padding:12px; text-align:center; box-shadow:0 1px 3px rgba(0,0,0,.05); }
.stat .num { font-size:20px; font-weight:700; color:#07c160; }
.stat .lbl { font-size:12px; color:#888; margin-top:2px; }
.linkbox { background:#f7f7f7; border:1px dashed #ccc; padding:10px; border-radius:8px; font-size:13px; word-break:break-all; margin-top:8px; }
.toast { position: fixed; left: 50%; top: 40%; transform: translateX(-50%); background: rgba(0,0,0,.8); color:#fff; padding: 10px 18px; border-radius: 8px; font-size: 14px; z-index: 100; display:none; }
.back { font-size: 14px; color:#07c160; cursor:pointer; margin-bottom:10px; display:inline-block; }
