/* ============================================================
   票务收集原型 · 手机端样式
   ============================================================ */
:root {
  --brand: #07C160;
  --brand-d: #04984A;
  --brand-l: #E8F8EF;
  --text: #111827;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --line: #EDEFF2;
  --bg: #F5F6F8;
  --card: #FFFFFF;
  --danger: #F53F3F;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: #ECEFF3;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; }

/* ---------------- 顶部演示条 ---------------- */
.demo-bar {
  position: fixed; inset: 0 0 auto 0; height: 48px; z-index: 200;
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid #E4E8EE;
}
.demo-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  color: #fff; background: linear-gradient(135deg, #07C160, #0FAF5E);
  padding: 3px 8px; border-radius: 6px;
}
.demo-name { font-size: 13px; color: #4B5563; font-weight: 600; }
.demo-switch { margin-left: auto; display: flex; gap: 4px; background: #F3F5F8; padding: 3px; border-radius: 9px; }
.demo-switch a {
  font-size: 12.5px; color: #4B5563; text-decoration: none;
  padding: 5px 12px; border-radius: 7px; transition: .18s;
}
.demo-switch a.on { background: #fff; color: #07A552; font-weight: 600; box-shadow: 0 1px 3px rgba(17,24,39,.1); }
.demo-switch a:hover { color: #07A552; }

/* ---------------- 舞台 ---------------- */
.stage {
  min-height: 100vh; padding: 78px 24px 40px;
  display: flex; align-items: flex-start; justify-content: center; gap: 44px;
}
.stage-note {
  width: 268px; margin-top: 60px; padding: 18px 20px;
  background: #fff; border: 1px solid #E4E8EE; border-radius: 14px;
  font-size: 12.5px; color: #6B7280; line-height: 1.75;
}
.stage-note b { display: block; color: #111827; font-size: 13px; margin-bottom: 8px; }
.stage-note ol { margin: 0; padding-left: 16px; }
.stage-note li { margin-bottom: 6px; }

/* ---------------- 手机外壳 ---------------- */
.phone {
  width: 390px; height: 844px; flex: 0 0 auto;
  background: #10131A; border-radius: 52px; padding: 11px;
  box-shadow: 0 30px 70px -18px rgba(16,21,32,.45), 0 0 0 1px rgba(16,21,32,.6);
  position: relative;
}
.phone::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 8px; width: 118px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.28);
}
.phone-screen {
  width: 100%; height: 100%; background: var(--bg);
  border-radius: 42px; overflow: hidden;
  display: flex; flex-direction: column; position: relative;
}

/* ---------------- 小程序导航栏 ---------------- */
.wx-nav {
  height: 46px; flex: 0 0 auto; background: #fff; position: relative;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #F0F2F5;
}
.wx-nav-title { font-size: 16px; font-weight: 600; letter-spacing: .2px; }
.wx-capsule {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 86px; height: 31px; border: 1px solid #E8EAED; border-radius: 16px;
  display: flex; align-items: center; justify-content: space-around;
  color: #333; background: rgba(255,255,255,.7);
}
.wx-capsule .dot { width: 4px; height: 4px; background: #333; border-radius: 50%; box-shadow: 7px 0 0 #333, 14px 0 0 #333; margin-right: 14px; }
.wx-capsule .dots { display: none; }
.wx-capsule .circle { width: 15px; height: 15px; border: 2.2px solid #333; border-radius: 50%; position: relative; }
.wx-capsule .circle::after { content: ""; position: absolute; inset: 3.5px; background: #333; border-radius: 50%; }

/* ---------------- 内容区 ---------------- */
.wx-body {
  flex: 1 1 auto; overflow-y: auto; padding: 12px 12px 24px;
  -webkit-overflow-scrolling: touch;
}
.wx-body::-webkit-scrollbar { width: 0; }

.scan-tip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: #04984A; background: var(--brand-l);
  padding: 5px 10px; border-radius: 7px; margin-bottom: 10px;
}

.hero-card {
  background: linear-gradient(135deg, #0AC163 0%, #04A34E 100%);
  border-radius: 16px; padding: 16px 16px 14px; color: #fff;
  box-shadow: 0 10px 22px -10px rgba(7,193,96,.7);
  margin-bottom: 12px; position: relative; overflow: hidden;
}
.hero-card::after {
  content: ""; position: absolute; right: -30px; top: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,.13);
}
.hero-card-t { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.hero-card-s { font-size: 12px; opacity: .88; margin-top: 5px; line-height: 1.5; }
.hero-card-row { display: flex; gap: 6px; margin-top: 12px; }
.chip {
  font-size: 10.5px; padding: 3px 8px; border-radius: 20px;
  background: rgba(255,255,255,.18); color: #fff;
}
.chip-green { background: rgba(255,255,255,.95); color: #04984A; font-weight: 600; }

.card {
  background: var(--card); border-radius: 14px; padding: 2px 14px;
  margin-bottom: 12px; box-shadow: 0 1px 2px rgba(17,24,39,.04);
}
.card-title {
  font-size: 13px; font-weight: 700; color: #111827;
  padding: 14px 0 4px; letter-spacing: .2px;
}

.field { padding: 12px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: none; }

.label {
  font-size: 12.5px; color: var(--text-2); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.label b {
  width: 17px; height: 17px; flex: 0 0 auto; border-radius: 50%;
  background: var(--brand-l); color: var(--brand-d);
  font-size: 10.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.label b.gray { background: #F3F4F6; color: #9CA3AF; }
.label i { color: var(--danger); font-style: normal; font-size: 12px; }

input[type="text"], input[type="tel"], input[type="number"], select {
  width: 100%; height: 44px; border-radius: 10px;
  background: #F7F8FA; border: 1px solid transparent;
  padding: 0 12px; font-size: 15px; color: var(--text);
  outline: none; transition: .18s; appearance: none;
}
input::placeholder { color: #BFC5CE; font-size: 14px; }
input:focus, select:focus {
  background: #fff; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(7,193,96,.12);
}
input.invalid { border-color: #FCA5A5; background: #FFF8F8; }

.select-wrap { position: relative; }
.select-wrap select { padding-right: 34px; cursor: pointer; }
.select-wrap .sel-arrow {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: #A8B0BB; pointer-events: none;
}

.route { display: flex; align-items: center; gap: 8px; }
.route input { flex: 1 1 0; min-width: 0; }
.route-mid { color: #B6BCC6; display: flex; align-items: center; flex: 0 0 auto; }
.route-mid--money { font-size: 15px; font-weight: 600; color: #6B7280; }
.g5 { flex: 5 1 0; min-width: 0; }
.g4 { flex: 4 1 0; min-width: 0; }

.hint { font-size: 11px; color: #AEB4BE; margin-top: 7px; line-height: 1.55; }
.hint-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hint-link {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 600; color: var(--brand-d);
  background: #F3FCF7; border: 1px solid #C9EFD9; border-radius: 6px;
  padding: 3px 8px; text-decoration: none; cursor: pointer; transition: .16s;
}
.hint-link:hover { background: var(--brand-l); }
.err { font-size: 11.5px; color: var(--danger); margin-top: 6px; display: none; }
.err.show { display: block; }

/* 上传 */
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.upload-add {
  height: 82px; border: 1px dashed #D5DAE2; border-radius: 10px;
  background: #FAFBFC; color: #A2A9B4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 11px; cursor: pointer; transition: .18s;
}
.upload-add:hover { border-color: var(--brand); color: var(--brand-d); background: #F6FDF9; }
.upload-item { position: relative; height: 82px; border-radius: 10px; overflow: hidden; background: #F3F4F6; }
.upload-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-del {
  position: absolute; right: 4px; top: 4px; width: 19px; height: 19px;
  border-radius: 50%; border: none; background: rgba(17,24,39,.62); color: #fff;
  font-size: 11px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* 按钮 */
.btn-primary {
  width: 100%; height: 48px; border: none; border-radius: 12px;
  background: linear-gradient(135deg, #0AC163, #04A34E); color: #fff;
  font-size: 16px; font-weight: 600; letter-spacing: .5px; cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(7,193,96,.85);
  transition: .16s; margin-top: 6px;
}
.btn-primary:active { transform: scale(.985); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-text {
  width: 100%; height: 42px; border: none; background: transparent;
  color: #8A9099; font-size: 13.5px; cursor: pointer;
}
.btn-text:hover { color: #4B5563; }
.foot-tip { text-align: center; font-size: 11px; color: #C2C7CF; margin: 6px 0 4px; }

/* tabbar */
.wx-tabbar {
  flex: 0 0 auto; height: 58px; background: #fff;
  border-top: 1px solid #F0F2F5;
  display: flex; align-items: center;
  padding-bottom: 4px;
}
.wx-tab {
  flex: 1; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #9CA3AF; font-size: 10.5px; padding: 6px 0;
}
.wx-tab.on { color: var(--brand); }

/* 我的 */
.mine-head { padding: 4px 2px 12px; }
.mine-head-t { font-size: 17px; font-weight: 700; }
.mine-head-s { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.rec-card {
  background: #fff; border-radius: 14px; padding: 14px;
  margin-bottom: 10px; box-shadow: 0 1px 2px rgba(17,24,39,.04);
  cursor: pointer; transition: .16s;
}
.rec-card:hover { box-shadow: 0 6px 18px -8px rgba(17,24,39,.18); }
.rec-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rec-name { font-size: 15px; font-weight: 600; }
.rec-amount { font-size: 16px; font-weight: 700; color: #F97316; }
.rec-amount small { font-size: 11px; font-weight: 500; margin-right: 1px; }
.rec-mid { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 13px; color: #374151; }
.rec-mid .arr { color: #C4CAD3; font-size: 12px; }
.rec-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.tag {
  font-size: 10.5px; padding: 2.5px 7px; border-radius: 5px;
  background: #F3F5F8; color: #6B7280;
}
.tag-green { background: var(--brand-l); color: var(--brand-d); }
.tag-orange { background: #FFF3E8; color: #E37318; }
.rec-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11px; color: #B6BCC6; }

.empty { text-align: center; padding: 54px 0; color: #AEB4BE; font-size: 13px; }
.empty svg { margin-bottom: 8px; }
.empty p { margin: 0 0 6px; }

/* 详情 sheet */
.sheet-mask {
  position: absolute; inset: 0; background: rgba(17,24,39,.42);
  z-index: 300; display: flex; align-items: flex-end;
  animation: fade .18s ease;
}
.sheet {
  width: 100%; max-height: 82%; background: #fff;
  border-radius: 18px 18px 0 0; padding: 8px 16px 18px;
  display: flex; flex-direction: column;
  animation: up .24s cubic-bezier(.22,1,.36,1);
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet-bar { width: 34px; height: 4px; border-radius: 3px; background: #E5E7EB; margin: 2px auto 10px; }
.sheet-header { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sheet-title { font-size: 16px; font-weight: 700; }
.sheet-sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.sheet-close { border: none; background: #F3F5F8; width: 26px; height: 26px; border-radius: 50%; color: #6B7280; cursor: pointer; font-size: 12px; }
.sheet-body { overflow-y: auto; padding-top: 6px; }
.kv { display: flex; padding: 10px 0; border-bottom: 1px dashed #F0F2F5; font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { width: 82px; flex: 0 0 auto; color: var(--text-3); font-size: 12.5px; }
.kv .v { flex: 1; color: #111827; word-break: break-all; }
.sheet-tickets { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 4px 0 8px; }
.sheet-tickets img { width: 100%; height: 78px; object-fit: cover; border-radius: 8px; cursor: zoom-in; }

/* 灯箱 / toast */
.lightbox {
  position: absolute; inset: 0; background: rgba(0,0,0,.9); z-index: 400;
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox img { max-width: 92%; max-height: 84%; border-radius: 6px; }

.toast {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%) scale(.94);
  background: rgba(17,24,39,.86); color: #fff; font-size: 13px;
  padding: 11px 18px; border-radius: 10px; z-index: 500;
  opacity: 0; pointer-events: none; transition: .2s; max-width: 78%; text-align: center;
  line-height: 1.5;
}
.toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* 小屏：全屏显示 */
@media (max-width: 960px) {
  .stage-note { display: none; }
}
@media (max-width: 560px) {
  .stage { padding: 48px 0 0; display: block; }
  .phone { width: 100%; height: 100vh; border-radius: 0; padding: 0; box-shadow: none; background: transparent; }
  .phone::after { display: none; }
  .phone-screen { border-radius: 0; }
  .demo-name { display: none; }
}
