:root {
  --text: #2a2418;
  --muted: #9a8f7a;
  --orange: #e6a23c;
  --pink: #f59ab2;
  --line: #e6e9ee;
  --card: rgba(255, 252, 245, 0.92);
  --chip: #fff6e8;
  --wx: #07c160;
  --qq: #12b7f5;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(80% 36% at 10% 0%, rgba(245, 154, 178, 0.35), transparent 55%),
    radial-gradient(70% 40% at 100% 8%, rgba(230, 162, 60, 0.28), transparent 50%),
    linear-gradient(180deg, #fff7ea 0%, #f6efe4 40%, #f3ebe1 100%);
  min-height: 100vh;
}

.app {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 12px 14px calc(76px + var(--safe-b));
}

.hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: rgba(255, 252, 245, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 22px rgba(42, 36, 24, 0.06);
}
.hero-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: cover;
  background: #fff;
  flex: none;
  border: 1px solid #ffe9bc;
}
.hero-copy { flex: 1; min-width: 0; }
.hero h1 { margin: 0; font-size: 17px; font-weight: 800; color: var(--text); }
.contact-btn {
  flex: none;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #e8f7fe;
  color: var(--qq);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.contact-btn svg { width: 16px; height: 16px; }
.hero p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }

.ks-btn {
  flex: none;
  height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: #ffeee7;
  color: #e8461c;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.ks-btn .ks-logo {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: block;
  flex: none;
}
.ks-btn:active { background: #ffe1d4; }
.ks-btn[hidden] { display: none !important; }

/* 窄屏：标题 + LOGO + 文字按钮全部保留，靠收紧间距/字号来放下 */
@media (max-width: 470px) {
  .hero { gap: 6px; }
  .hero h1 { font-size: 14px; letter-spacing: -0.2px; }
  .ks-btn, .contact-btn { padding: 0 6px; font-size: 10.5px; gap: 3px; }
  .ks-btn .ks-logo { width: 15px; height: 15px; }
  .contact-btn svg { width: 14px; height: 14px; }
}
/* 手机：进一步收紧，保证标题单行 */
@media (max-width: 389px) {
  .hero { padding: 10px 11px; gap: 5px; }
  .hero-mark { width: 44px; height: 44px; border-radius: 12px; }
  .hero h1 { font-size: 13px; }
  .ks-btn, .contact-btn { padding: 0 5px; font-size: 10px; }
  .ks-btn .ks-logo { width: 14px; height: 14px; }
  .contact-btn svg { width: 13px; height: 13px; }
}
/* 极窄（≤352px）：空间实在不够，只保留 LOGO */
@media (max-width: 352px) {
  .ks-btn { width: 30px; padding: 0; justify-content: center; gap: 0; }
  .ks-btn .ks-logo { width: 18px; height: 18px; }
  .ks-btn span { display: none; }
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(42, 36, 24, 0.05);
}
.card h2 { margin: 0 0 8px; font-size: 14px; font-weight: 800; }

.intro {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.65;
  color: #4a4134;
}

.feat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.feat {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.2;
}
.feat i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
}
.feat span { min-width: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff4e0;
  color: #8a5a12;
}
.promise-tags {
  width: 100%;
  margin: 0 0 8px;
  justify-content: center;
}

.query-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.query-row {
  display: flex;
  gap: 8px;
}
#query-oid {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
  outline: none;
}
#query-oid:focus { border-color: rgba(232, 154, 46, 0.55); }
.query-btn {
  flex: none;
  height: 40px;
  min-width: 78px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #f0a14a, #e07a2f);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.query-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.query-result {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}
.query-result.is-err { border-color: rgba(185, 28, 28, 0.25); background: #fff7f7; }
.query-result-title {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 10px;
  color: #166534;
}
.query-result.is-err .query-result-title { color: #b91c1c; }
.query-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(60, 48, 30, 0.06);
  font-size: 13px;
}
.query-item:last-child { border-bottom: 0; }
.query-label { width: 72px; flex: none; color: var(--muted); }
.query-value { flex: 1; color: var(--text); word-break: break-all; }
.query-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.query-badge.ok { background: #dcfce7; color: #166534; }
.query-badge.run { background: #ffedd5; color: #9a3412; }
.query-imgs { margin-top: 10px; }
.query-cate-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.query-cate {
  border: 0;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  background: #f3efe6;
  color: #6b5a45;
  cursor: pointer;
}
.query-cate.is-on { background: #e89a2e; color: #fff; font-weight: 700; }
.query-img-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.query-img-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #faf7f0;
}
.query-img-wrap img {
  width: 100%;
  display: block;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: zoom-in;
}
.query-img-time {
  padding: 4px 6px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.query-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 8px 0;
}
.feat.is-link { cursor: pointer; }
.feat.is-link:active { background: #fff8ee; }

.img-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 16, 10, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.img-preview-mask[hidden] { display: none !important; }
.img-preview {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 10px;
  background: #fff;
}
.img-preview-close {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
}

.pay-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
}
.pay-top b { color: var(--text); }
.amt { color: var(--text); font-weight: 800; font-size: 13px; }
.amt em { font-style: normal; font-size: 26px; margin-left: 1px; }

/* QQ/微信双区胶囊 */
.zone-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0 0 10px;
}
.zone-lead {
  font-size: 13px;
  font-weight: 800;
  color: #3b2f22;
}
.zone-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}
.zone-chip svg { width: 12px; height: 12px; flex: none; }
.zone-chip.qq { background: #12b7f5; }
.zone-chip.wx { background: #07c160; }

/* 安卓 / 苹果 价格切换 */
.plat-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.plat-tab {
  flex: 1;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f3ec;
  color: #6b5a45;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.plat-tab svg { width: 16px; height: 16px; flex: none; }
.plat-tab.android.is-on {
  background: linear-gradient(135deg, #a4c639, #7fa022);
  border-color: #7fa022;
  color: #fff;
}
.plat-tab.ios.is-on {
  background: #1d1d1f;
  border-color: #1d1d1f;
  color: #fff;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.price-item {
  border: 1px solid transparent;
  background: #f7f3ec;
  border-radius: 10px;
  padding: 6px 2px 5px;
  text-align: center;
  cursor: pointer;
}
.price-item .l { font-size: 11px; color: var(--muted); }
.price-item .a { margin-top: 1px; font-size: 13px; font-weight: 800; }
.price-item.is-on {
  background: #fff4e0;
  border-color: var(--orange);
}
.plat-android .price-item.is-on {
  background: #f0f7e0;
  border-color: #7fa022;
}
.plat-ios .price-item.is-on {
  background: #ececee;
  border-color: #1d1d1f;
}

.footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 4px 8px 0;
}

.paybar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 8px 14px calc(8px + var(--safe-b));
  background: linear-gradient(180deg, rgba(246, 239, 228, 0), #f6efe4 28%);
  display: flex;
  justify-content: center;
}
.paybar-inner {
  width: min(460px, 100%);
  display: flex;
  gap: 8px;
}
.group-btn, .pay-btn {
  height: 46px;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.group-btn svg, .pay-btn svg { width: 18px; height: 18px; flex: none; }
.group-btn { flex: 1; background: #e8f7fe; color: #0b8ec4; }
.pay-btn { flex: 1; background: var(--wx); color: #fff; }

.toast {
  position: fixed;
  left: 50%;
  top: 22%;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(86vw, 300px);
  background: rgba(42, 36, 24, 0.92);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* 背景音乐悬浮球 */
.bgm-ball {
  position: fixed;
  z-index: 45;
  right: max(14px, calc((100vw - 460px) / 2 + 14px));
  bottom: calc(72px + var(--safe-b));
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(140deg, #ffcf9a, #ea8b34);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(224, 122, 47, 0.32), 0 0 0 3px rgba(255, 252, 245, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bgm-ball[hidden] { display: none !important; }
.bgm-ball .bgm-ico {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
  flex: none;
}
.bgm-ball .bgm-ico-pause { display: none; }
.bgm-ball.is-playing .bgm-ico-play { display: none; }
.bgm-ball.is-playing .bgm-ico-pause { display: block; }
.bgm-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px dashed rgba(234, 139, 52, 0.5);
  opacity: 0;
  transition: opacity 0.2s;
}
.bgm-ball.is-playing .bgm-ring {
  opacity: 1;
  animation: bgmspin 6s linear infinite;
}
@keyframes bgmspin { to { transform: rotate(360deg); } }
/* 自动播放被浏览器拦截时，轻微呼吸提示可点 */
.bgm-ball.is-blocked { animation: bgmbeat 1.8s ease-in-out infinite; }
@keyframes bgmbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.pay-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(42, 36, 24, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px calc(12px + var(--safe-b));
}
.pay-mask[hidden] { display: none !important; }
.pay-sheet {
  position: relative;
  width: min(420px, 100%);
  background: #fffdf8;
  border-radius: 16px;
  padding: 18px 14px 12px;
  text-align: center;
}
.pay-sheet-close {
  position: absolute;
  right: 8px; top: 4px;
  width: 36px; height: 36px;
  border: 0; background: transparent;
  font-size: 26px; color: var(--muted); cursor: pointer;
}
.pay-sheet-amt {
  font-size: 24px;
  font-weight: 800;
  color: #3b2f22;
  margin: 2px 28px 0;
}
.pay-sheet-qr-wrap {
  width: min(240px, 68vw);
  margin: 14px auto 0;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(60, 48, 30, 0.12);
  box-sizing: border-box;
}
.pay-sheet-qr {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}
.pay-sheet-tip {
  margin: 12px 6px 0;
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
  color: #166534;
  text-align: center;
}
.pay-sheet-foot {
  margin: 10px 0 0;
  background: #fff1db;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
}
.pay-sheet-note,
.pay-sheet-after {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
  color: #8a3b12;
}
.pay-sheet-after {
  margin-top: 6px;
}

.boot {
  position: fixed; inset: 0; z-index: 99;
  display: flex; align-items: center; justify-content: center;
  background: #fff7ea;
  color: var(--text);
  font-size: 14px;
  text-align: center;
}
.boot.is-hidden { display: none; }
.spin {
  width: 28px; height: 28px;
  margin: 0 auto 10px;
  border: 3px solid rgba(245, 154, 178, 0.25);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
