:root {
  --bg: #f7f7fc;
  --bg-soft: #f0eeff;
  --ink: #141450;
  --ink-soft: #7a7aa9;
  --accent: #262395;
  --accent-strong: #1c1a75;
  --card-white: #ffffff;
  --lavender-1: #d1e4fe;
  --lavender-2: #d7c6f0;
  --lavender-3: #e6c3e2;
  --line: #e8e6f8;
  --cmn: #9aa0b5;
  --rare: #4f8df0;
  --epic: #9b59e8;
  --legend: #d9a515;
  --ssr: #e74c7c;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 8px 24px rgba(38, 35, 149, 0.10);
  --shadow-soft: 0 4px 14px rgba(38, 35, 149, 0.07);
}

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "SF Pro Text", "Segoe UI", sans-serif;
  background: radial-gradient(1200px 700px at 70% -10%, #e8e2ff 0%, #dcd8f8 40%, #e9edfd 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 0;
}

/* ---------- 设备外壳（iPhone 16 比例 393×852） ---------- */
.device-shell {
  position: relative;
  width: 393px;
  height: 852px;
  background: var(--bg);
  border-radius: 54px;
  box-shadow: 0 30px 80px rgba(20, 20, 80, 0.35), inset 0 0 0 10px #0e0e2a, inset 0 0 0 12px #2c2c50;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.device-statusbar {
  height: 54px;
  flex: 0 0 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  z-index: 10;
  position: relative;
}

.device-statusbar .status-icons { display: flex; align-items: center; gap: 7px; font-size: 12px; }
.device-statusbar .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-strong); display: inline-block; }

.app {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ---------- 页面 ---------- */
.page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  scrollbar-width: none;
  padding-bottom: 96px;
}
.page::-webkit-scrollbar { display: none; }
.page.active { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- 首页 ---------- */
.home-header {
  padding: 14px 20px 14px;
  background: linear-gradient(180deg, #f0eeff 0%, #e6e2fa 70%, #f9f9fe 100%);
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
}

.home-header .hello-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2px;
}
.hello-row .hello {
  font-size: 12px;
  letter-spacing: 1.4px;
  color: var(--ink-soft);
  font-weight: 700;
}
.hello-row .level-badge {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-strong);
  background: rgba(255,255,255,.72);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.home-header h1 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--ink);
}
.home-header h1 .brand-en {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--accent);
  margin-top: 4px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.stat-card {
  background: var(--card-white);
  border-radius: var(--radius-md);
  padding: 9px 6px 8px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(232,230,248,.8);
}
.stat-card .num {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent-strong);
  line-height: 1.1;
}
.stat-card .label {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 3px;
  font-weight: 600;
}

/* ---------- 今日发现卡片 ---------- */
.home-body { padding: 18px 20px 0; }

.discovery-card {
  border-radius: var(--radius-lg);
  padding: 16px 18px 14px;
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(128deg, var(--lavender-1) 0%, var(--lavender-2) 55%, var(--lavender-3) 100%);
  box-shadow: var(--shadow);
}
.discovery-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 180px at 85% -20%, rgba(255,255,255,.55), transparent 60%);
  pointer-events: none;
}

.discovery-card .card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.discovery-card .airport {
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}
.discovery-card .rarity-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .6px;
}
.rarity-badge.ssr { background: rgba(231,76,124,.14); color: #c81e52; }
.rarity-badge.legend { background: rgba(217,165,21,.16); color: #9a7407; }
.rarity-badge.epic { background: rgba(155,89,232,.14); color: #7d2fd0; }
.rarity-badge.rare { background: rgba(79,141,240,.14); color: #2368d8; }
.rarity-badge.cmn { background: rgba(154,160,181,.18); color: #626a80; }

.discovery-card .eyebrow {
  font-size: 11px;
  letter-spacing: 2.2px;
  font-weight: 800;
  color: rgba(20,20,80,.62);
  position: relative;
  z-index: 1;
}
.discovery-card h2 {
  font-size: 23px;
  font-weight: 900;
  margin: 2px 0 4px;
  letter-spacing: .3px;
  position: relative;
  z-index: 1;
}
.discovery-card .airline-line {
  font-size: 13px;
  font-weight: 700;
  color: rgba(20,20,80,.75);
  position: relative;
  z-index: 1;
}

.discovery-card .plane-art {
  height: 96px;
  margin: 4px -6px 0;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plane-art img {
  max-height: 88px;
  max-width: 100%;
  filter: drop-shadow(0 6px 14px rgba(30,28,110,.28));
}

.discovery-card .card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}
.discovery-card .eta {
  font-size: 13px;
  font-weight: 800;
  color: rgba(20,20,80,.85);
}
.discovery-card .eta small { display: block; font-size: 10px; font-weight: 700; color: rgba(20,20,80,.55); letter-spacing: .4px; }
.btn-go {
  background: var(--accent-strong);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .4px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(28,26,117,.35);
  transition: transform .12s ease;
}
.btn-go:active { transform: scale(.95); }

/* ---------- 最近发现 ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 12px;
}
.section-head h3 { font-size: 16px; font-weight: 900; }
.section-head .more {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
}

.recent-list { display: flex; flex-direction: column; gap: 10px; }
.recent-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-white);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(232,230,248,.9);
  cursor: pointer;
  transition: transform .12s ease;
}
.recent-card:active { transform: scale(.98); }
.recent-card .mini-art {
  width: 74px;
  height: 48px;
  flex: 0 0 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
}
.recent-card .mini-art img { max-height: 40px; max-width: 66px; }
.recent-card .rc-info { flex: 1; min-width: 0; }
.recent-card .rc-model { font-size: 14px; font-weight: 800; }
.recent-card .rc-airline { font-size: 11px; color: var(--ink-soft); font-weight: 600; margin-top: 2px; }
.recent-card .rc-rarity { font-size: 10px; font-weight: 800; letter-spacing: .4px; margin-top: 3px; }
.rc-stars { color: #e8b93a; font-size: 11px; letter-spacing: 1px; margin-left: 4px; }

/* ---------- 探索页 ---------- */
.explore-head {
  padding: 22px 20px 16px;
}
.explore-head h2 { font-size: 24px; font-weight: 900; }
.explore-head p { font-size: 12px; color: var(--ink-soft); margin-top: 4px; font-weight: 600; }

.airport-picker {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 6px;
  scrollbar-width: none;
}
.airport-picker::-webkit-scrollbar { display: none; }
.airport-chip {
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
}
.airport-chip.active {
  background: var(--accent-strong);
  color: #fff;
  border-color: var(--accent-strong);
}

.task-card {
  margin: 14px 20px 0;
  border-radius: var(--radius-lg);
  padding: 16px;
  background: linear-gradient(128deg, #e3ecff, #e8dcff);
  box-shadow: var(--shadow-soft);
}
.task-card h4 { font-size: 14px; font-weight: 900; }
.task-card p { font-size: 12px; color: var(--ink-soft); margin-top: 4px; line-height: 1.6; }
.task-progress { margin-top: 12px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.8); overflow: hidden; }
.task-progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7d5ff0); }

.task-list { padding: 4px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
}
.task-item .state-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex: 0 0 38px;
  background: var(--bg-soft);
}
.task-item .ti-info { flex: 1; min-width: 0; }
.task-item .ti-model { font-size: 13px; font-weight: 800; }
.task-item .ti-sub { font-size: 11px; color: var(--ink-soft); margin-top: 2px; font-weight: 600; }
.task-item .ti-state {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--accent);
  white-space: nowrap;
}

/* ---------- 拍摄页 ---------- */
.camera-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 20px 26px;
  background: linear-gradient(180deg, #f3f1ff 0%, #ffffff 100%);
}
.camera-head { display: flex; justify-content: space-between; align-items: center; }
.camera-head h2 { font-size: 22px; font-weight: 900; }
.camera-head .cam-tip { font-size: 11px; color: var(--ink-soft); font-weight: 700; }

.viewfinder {
  flex: 1;
  margin-top: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, #dfe9ff 0%, #d8ccf8 55%, #efcfe6 100%);
  border: 2px solid rgba(255,255,255,.7);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.viewfinder .vf-inner { text-align: center; color: rgba(20,20,80,.6); }
.viewfinder .vf-icon { font-size: 52px; }
.viewfinder .vf-text { font-size: 13px; font-weight: 800; margin-top: 10px; letter-spacing: .5px; }
.viewfinder .vf-sub { font-size: 11px; margin-top: 4px; font-weight: 600; }
.viewfinder img.preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.viewfinder .scanline {
  position: absolute;
  left: 12px; right: 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(38,35,149,.7), transparent);
  animation: scan 2.4s ease-in-out infinite;
}
@keyframes scan { 0%,100% { top: 12%; } 50% { top: 86%; } }

.shutter-row {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 22px;
}
.shutter {
  width: 74px; height: 74px;
  border-radius: 50%;
  border: 5px solid var(--accent-strong);
  background: #fff;
  position: relative;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(28,26,117,.28);
  transition: transform .1s ease;
}
.shutter:active { transform: scale(.9); }
.shutter::after {
  content: "";
  position: absolute; inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5b58d8, var(--accent-strong));
}
.shutter.analyzing::after { animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.analyze-result {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-soft);
}
.analyze-result h4 { font-size: 13px; font-weight: 900; margin-bottom: 8px; display: flex; justify-content: space-between; }
.analyze-result .conf { color: #1a9e4b; font-size: 12px; }
.ar-row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; border-top: 1px dashed var(--line); }
.ar-row:first-of-type { border-top: none; }
.ar-row b { font-weight: 800; }
.ar-row span { color: var(--ink-soft); font-weight: 600; }
.unlock-btn {
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-strong), #5b58d8);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .5px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(28,26,117,.3);
}
.unlock-btn:disabled { opacity: .5; cursor: default; }

/* ---------- 图鉴页 ---------- */
.enc-head {
  padding: 22px 20px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.enc-head h2 { font-size: 24px; font-weight: 900; }
.enc-head .enc-count { font-size: 12px; color: var(--ink-soft); font-weight: 700; }

.rarity-filter {
  display: flex;
  gap: 7px;
  padding: 12px 20px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.rarity-filter::-webkit-scrollbar { display: none; }
.rf-chip {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  transition: all .15s ease;
}
.rf-chip[data-r="CMN"] { color: var(--cmn); }
.rf-chip[data-r="RARE"] { color: var(--rare); }
.rf-chip[data-r="EPIC"] { color: var(--epic); }
.rf-chip[data-r="LEGEND"] { color: var(--legend); }
.rf-chip[data-r="SSR"] { color: var(--ssr); }
.rf-chip.active { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff !important; }

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 20px 0;
}
.collect-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  border: 1px solid var(--line);
  transition: transform .12s ease;
  position: relative;
}
.collect-card:active { transform: scale(.97); }
.collect-card .cc-art {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.collect-card .cc-art img { max-height: 74px; max-width: 90%; filter: drop-shadow(0 4px 10px rgba(30,28,110,.2)); }
.collect-card .cc-body { padding: 10px 12px 12px; }
.collect-card .cc-model { font-size: 12.5px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collect-card .cc-sub { font-size: 10px; color: var(--ink-soft); font-weight: 600; margin-top: 3px; }
.collect-card .cc-no {
  position: absolute;
  top: 8px; left: 10px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .5px;
  color: rgba(20,20,80,.55);
  background: rgba(255,255,255,.85);
  padding: 2px 7px;
  border-radius: 999px;
}
.rarity-cmn .cc-art { background: linear-gradient(140deg, #eceef5, #dde1ec); }
.rarity-rare .cc-art { background: linear-gradient(140deg, #dce9ff, #bcd4ff); }
.rarity-epic .cc-art { background: linear-gradient(140deg, #e9dcff, #cdb4ff); }
.rarity-legend .cc-art { background: linear-gradient(140deg, #fff3cf, #f5d98a); }
.rarity-ssr .cc-art { background: linear-gradient(140deg, #ffe0ea, #ffb3cd); }

.empty-state {
  text-align: center;
  padding: 70px 30px;
  color: var(--ink-soft);
}
.empty-state .es-icon { font-size: 54px; }
.empty-state p { font-size: 13px; font-weight: 700; margin-top: 14px; line-height: 1.7; }
.empty-state .hint { font-size: 11px; margin-top: 6px; opacity: .8; }

/* ---------- 成就页 ---------- */
.ach-head { padding: 22px 20px 6px; }
.ach-head h2 { font-size: 24px; font-weight: 900; }
.ach-head p { font-size: 12px; color: var(--ink-soft); margin-top: 4px; font-weight: 600; }

.ach-summary {
  margin: 14px 20px 0;
  border-radius: var(--radius-lg);
  padding: 18px;
  background: linear-gradient(128deg, #e9dcff, #d8e8ff);
  box-shadow: var(--shadow-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ach-summary .as-num { font-size: 34px; font-weight: 900; color: var(--accent-strong); }
.ach-summary .as-label { font-size: 12px; color: var(--ink-soft); font-weight: 700; }
.ach-summary .as-pct { font-size: 15px; font-weight: 900; color: var(--accent); }

.ach-list { padding: 14px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.ach-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 13px 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.ach-item .ach-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex: 0 0 44px;
  background: var(--bg-soft);
}
.ach-item.locked { opacity: .55; filter: grayscale(.8); }
.ach-item .ach-icon.locked-ic { background: #eef0f6; }
.ach-info { flex: 1; min-width: 0; }
.ach-info .ach-name { font-size: 13.5px; font-weight: 800; }
.ach-info .ach-desc { font-size: 11px; color: var(--ink-soft); margin-top: 2px; font-weight: 600; }
.ach-state { font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 999px; }
.ach-state.done { background: #e6f7ee; color: #1a9e4b; }
.ach-state.todo { background: #f0f1f8; color: #9aa0b5; }

/* ---------- 底部导航 ---------- */
.tabbar {
  flex: 0 0 88px;
  height: 88px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 10px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  position: relative;
  z-index: 20;
}
.tab {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  color: #b3b7ca;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 2px 8px;
}
.tab .tab-icon { font-size: 21px; line-height: 1; }
.tab.active { color: var(--accent-strong); }
.tab.active .tab-icon { transform: translateY(-1px); }

/* 线性 SVG 图标（替代 emoji） */
.es-icon, .state-icon, .vf-icon, .ach-icon, .sc-qr {
  display: flex;
  align-items: center;
  justify-content: center;
}
.es-icon svg, .state-icon svg, .vf-icon svg, .ach-icon svg, .sc-qr svg { display: block; }
.tab-icon svg { display: block; margin: 0 auto; }
.empty-state .es-icon { color: #b9b7d6; }
.state-icon { color: #6b5bd6; }
.vf-icon { color: #6b5bd6; }
.ach-icon { color: #6b5bd6; }
.ach-icon.locked-ic { color: #a9a9c9; }
.sc-qr { color: #6b5bd6; }

/* ---------- 收藏卡详情 Overlay ---------- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(20,20,60,.45);
  backdrop-filter: blur(6px);
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 26px;
}
.overlay.open { display: flex; }

.card-detail {
  width: 100%;
  max-width: 330px;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(10,10,40,.5);
  animation: pop .28s cubic-bezier(.2,1.4,.4,1);
}
@keyframes pop { from { transform: scale(.86); opacity: 0; } to { transform: none; opacity: 1; } }

.card-detail .cd-art {
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.card-detail .cd-art img { max-height: 130px; max-width: 85%; filter: drop-shadow(0 8px 18px rgba(20,20,70,.3)); }
.card-detail .cd-art .cd-no {
  position: absolute;
  top: 14px; left: 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: rgba(20,20,80,.6);
  background: rgba(255,255,255,.8);
  padding: 3px 10px;
  border-radius: 999px;
}
.card-detail .cd-art .cd-rarity {
  position: absolute;
  top: 14px; right: 16px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .6px;
}
.card-detail .cd-body { padding: 16px 18px 18px; }
.card-detail .cd-model { font-size: 20px; font-weight: 900; }
.card-detail .cd-sub { font-size: 12px; color: var(--ink-soft); margin-top: 3px; font-weight: 700; }
.card-detail .cd-desc { font-size: 12px; color: var(--ink-soft); line-height: 1.7; margin-top: 10px; font-weight: 500; }
.cd-meta {
  margin-top: 14px;
  background: var(--bg);
  border-radius: 14px;
  padding: 4px 14px;
}
.cd-meta .cd-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 12px; border-top: 1px dashed var(--line); }
.cd-meta .cd-row:first-child { border-top: none; }
.cd-meta .cd-row b { font-weight: 800; }
.cd-meta .cd-row span { color: var(--ink-soft); font-weight: 600; text-align: right; }
.cd-actions { display: flex; gap: 10px; margin-top: 16px; }
.cd-actions button {
  flex: 1;
  border: none;
  border-radius: 999px;
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.btn-share { background: linear-gradient(90deg, var(--accent-strong), #5b58d8); color: #fff; }
.btn-close { background: var(--bg-soft); color: var(--accent); }

/* ---------- 分享卡片 ---------- */
.share-card {
  width: 100%;
  max-width: 330px;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(10,10,40,.5);
  animation: pop .28s cubic-bezier(.2,1.4,.4,1);
}
.share-card .sc-art {
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.share-card .sc-art img { max-height: 150px; max-width: 88%; }
.share-card .sc-brand {
  position: absolute;
  top: 14px; left: 18px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 6px rgba(20,20,80,.4);
}
.share-card .sc-body { padding: 16px 18px 18px; text-align: center; }
.share-card .sc-model { font-size: 21px; font-weight: 900; }
.share-card .sc-line { font-size: 12px; color: var(--ink-soft); margin-top: 4px; font-weight: 700; }
.share-card .sc-qr {
  margin: 14px auto 0;
  width: 92px; height: 92px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  background: var(--bg);
}
.share-card .sc-actions { display: flex; gap: 10px; margin-top: 16px; }
.share-card .sc-actions button { flex: 1; border: none; border-radius: 999px; padding: 12px; font-size: 13px; font-weight: 800; cursor: pointer; }
.btn-save { background: linear-gradient(90deg, var(--accent-strong), #5b58d8); color: #fff; }
.btn-back { background: var(--bg-soft); color: var(--accent); }

/* ---------- Toast ---------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20,20,80,.92);
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: all .3s ease;
  max-width: 86%;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 底部提示（画布外说明） ---------- */
.hint {
  margin-top: 18px;
  max-width: 393px;
  text-align: center;
  color: rgba(20,20,80,.72);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.9;
}
.hint .hint-legend { margin-top: 4px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
}
.pill-cmn { color: var(--cmn); }
.pill-rare { color: var(--rare); }
.pill-epic { color: var(--epic); }
.pill-legend { color: var(--legend); }
.pill-ssr { color: var(--ssr); }

@media (max-width: 430px) {
  body { padding: 0; }
  .device-shell {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .hint { display: none; }
}
