:root {
  --purple: #6d5efc;
  --purple-2: #8b6cf6;
  --bg: #f4f6fb;
  --text: #1f2430;
  --muted: #8b93a7;
  --card: #ffffff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #e8ecf4; color: var(--text); font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
body { display: flex; justify-content: center; }
.phone {
  width: 390px; max-width: 100%; min-height: 100%; background: var(--bg);
  box-shadow: 0 0 40px rgba(40, 50, 90, .12); position: relative;
}
.statusbar {
  height: 44px; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 18px 6px; color: #fff; font-size: 14px; font-weight: 600;
}
.capsule { width: 86px; height: 28px; border: 1px solid rgba(255,255,255,.4); border-radius: 14px; display: flex; }
.capsule span { flex: 1; display: grid; place-items: center; font-size: 12px; opacity: .9; }
.capsule span + span { border-left: 1px solid rgba(255,255,255,.4); }

.hero {
  background: linear-gradient(180deg, #5b7cff 0%, #7a62f5 55%, #8e6cf6 100%);
  padding: 0 18px 22px; color: #fff; border-bottom-left-radius: 0;
}
.nav-title { text-align: center; font-size: 16px; margin-top: 2px; letter-spacing: .5px; }
.hero h1 { font-size: 30px; font-weight: 700; margin: 18px 0 16px; }
.search {
  background: #fff; border-radius: 24px; height: 44px; display: flex; align-items: center;
  padding: 0 16px; color: #9aa3b5; gap: 8px;
}
.search input { border: 0; outline: 0; flex: 1; font-size: 14px; color: var(--text); background: transparent; }

.cats {
  display: flex; gap: 10px; padding: 16px 14px 8px; overflow-x: auto;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  min-width: 58px; height: 68px; border-radius: 14px; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; font-size: 12px; color: #60677a; box-shadow: 0 4px 12px rgba(80,90,130,.06);
}
.cat.active { background: linear-gradient(180deg, #7b6efc, #6a4df0); color: #fff; }
.cat .ico { font-size: 20px; }

.quick {
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 10px 4px;
}
.quick div { text-align: center; font-size: 12px; color: #5d6478; }
.quick .qico { font-size: 22px; margin-bottom: 6px; }

.list { padding: 8px 14px 88px; }
.card {
  background: #fff; border-radius: 18px; padding: 16px; margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(80,90,130,.05);
}
.card-hd { display: flex; gap: 12px; align-items: flex-start; }
.logo {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.meta { flex: 1; min-width: 0; }
.meta .name { font-size: 18px; font-weight: 700; }
.meta .vendor { font-size: 12px; color: var(--muted); margin-top: 2px; }
.price {
  font-size: 13px; font-weight: 600; padding: 4px 8px; border-radius: 12px; white-space: nowrap;
}
.price.paid { color: #f59e0b; }
.price.free { color: #22c55e; }
.summary { margin-top: 10px; font-size: 13px; line-height: 1.7; color: #5c6478; }
.card-ft { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: #f3f5f9; color: #7b8499; font-size: 12px; padding: 3px 8px; border-radius: 8px; }
.stars { color: #f5b942; font-size: 13px; letter-spacing: 1px; }

.tabbar {
  position: sticky; bottom: 0; background: #fff; display: grid; grid-template-columns: repeat(4, 1fr);
  height: 62px; border-top: 1px solid #eef0f5; padding-bottom: 6px;
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; color: #8b93a7; font-size: 11px; gap: 2px;
}
.tabbar a.active { color: var(--purple); }
.tabbar .tico { font-size: 18px; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 88px; background: linear-gradient(180deg, #5b7cff, #7a62f5);
  color: #fff; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px;
  position: relative;
}
.topbar .back { position: absolute; left: 14px; bottom: 14px; font-size: 18px; color: #fff; text-decoration: none; }
.panel { padding: 16px 14px 90px; }
.btn {
  width: 100%; height: 46px; border: 0; border-radius: 23px; color: #fff; font-size: 16px;
  background: linear-gradient(90deg, #6d7cff, #8a5cf6); cursor: pointer;
}
.btn.ghost { background: #fff; color: var(--purple); border: 1px solid #d9d4ff; }
.muted { color: var(--muted); font-size: 13px; }
.upload {
  border: 1.5px dashed #c9c4ef; background: #faf9ff; border-radius: 16px; min-height: 180px;
  display: grid; place-items: center; color: #7b7498; text-align: center; overflow: hidden;
}
.upload img, .compare img { width: 100%; display: block; }
.compare img.zoomable { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,.86);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; cursor: zoom-out;
}
.lightbox img { max-width: 96%; max-height: 86vh; object-fit: contain; border-radius: 8px; }
.lightbox p { color: #fff; margin-top: 12px; font-size: 13px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.badge-ai {
  display: inline-block; background: rgba(0,0,0,.55); color: #fff; font-size: 11px;
  padding: 2px 8px; border-radius: 8px; margin-top: 6px;
}
.row { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.progress { height: 8px; background: #ece8ff; border-radius: 8px; overflow: hidden; margin: 16px 0; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #6d7cff, #8a5cf6); }
.toast { position: fixed; left: 50%; top: 46%; transform: translate(-50%,-50%); background: rgba(0,0,0,.72); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; z-index: 9; }
.hide { display: none; }
.pack { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pack button { background: #fff; border: 1px solid #eceef4; border-radius: 14px; padding: 16px; cursor: pointer; }
.pack b { display: block; font-size: 20px; color: var(--purple); }
.hint { font-size: 12px; color: #8b93a7; margin-top: 8px; line-height: 1.6; }
.work-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.work-grid .card { padding: 8px; }
.work-grid img { border-radius: 10px; height: 120px; object-fit: cover; width: 100%; }
.notice {
  background: #fff7ed; color: #b45309; font-size: 12px; padding: 10px 12px; border-radius: 10px; margin-bottom: 12px;
}
