:root {
  --bg: #070708;
  --surface: #111114;
  --card: #18181c;
  --gold: #d4af37;
  --gold-2: #f3d98a;
  --text: #f6f1e6;
  --muted: #9a9488;
  --line: rgba(212, 175, 55, 0.16);
  --ok: #3fae74;
  --danger: #c45c5c;
  --tab: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

.file-tip {
  margin: 10px 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #3a2a12;
  color: var(--gold-2);
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--line);
}
.file-tip code {
  color: #fff;
  font-size: 11px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  background: #000;
  color: var(--text);
  overflow: hidden;
}

.phone {
  width: 100%;
  max-width: 430px;
  height: 100%;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: calc(10px + var(--safe-t)) 16px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #141416, #0c0c0e);
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  background: #151518;
}
.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brand h1 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.brand p {
  margin: 1px 0 0;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lang-btn {
  border: 1px solid var(--line);
  background: #1c1c20;
  color: var(--gold-2);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pages { flex: 1; overflow: hidden; position: relative; }
.page {
  position: absolute;
  inset: 0;
  overflow: auto;
  overflow-x: hidden;
  padding: 14px 14px calc(var(--tab) + var(--safe-b) + 18px);
  display: none;
  -webkit-overflow-scrolling: touch;
}
.page.active { display: block; }

.hero {
  position: relative;
  border-radius: 22px;
  padding: 22px 18px 18px;
  overflow: hidden;
  background:
    radial-gradient(120px 80px at 90% 10%, rgba(212,175,55,.28), transparent 70%),
    linear-gradient(160deg, #1d1a12, #121214 55%, #0c0c0e);
  border: 1px solid var(--line);
}
.hero h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  white-space: pre-line;
}
.hero p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 10px 0 16px; }
.row { display: flex; gap: 8px; }
.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 700;
  font-size: 13px;
}
.btn.gold { background: linear-gradient(180deg, #f0d78c, #c9a227); color: #1a1304; flex: 1; }
.btn.ghost { background: #232328; color: var(--text); border: 1px solid var(--line); flex: 1; }

.section-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 18px 2px 10px;
}
.section-h h3 { margin: 0; font-size: 15px; }
.section-h span { color: var(--muted); font-size: 12px; }

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: #151518;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
}
.chip.on { background: rgba(212,175,55,.14); color: var(--gold-2); border-color: rgba(212,175,55,.4); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
  color: inherit;
  padding: 0;
  content-visibility: auto;
  contain: content;
  contain-intrinsic-size: auto 240px;
}
.card .pic {
  aspect-ratio: 1;
  background: #0e0e10;
  overflow: hidden;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card .meta { padding: 9px 10px 11px; }
.card .name {
  font-size: 12px;
  line-height: 1.35;
  height: 32px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.card .price { margin-top: 6px; color: var(--gold-2); font-weight: 700; font-size: 13px; }
.card .market-line {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
  font-weight: 400;
}
.card .market-line.strike,
.price-sm.strike {
  text-decoration: line-through;
  opacity: .72;
}
.detail-actions {
  display: grid;
  gap: 8px;
}
.detail-actions .btn { width: 100%; }
.coupon-box { display: grid; gap: 8px; }
.coupon-card b {
  display: block;
  color: var(--gold-2);
  font-size: 22px;
  letter-spacing: 0.04em;
}
.card .sub { color: var(--muted); font-size: 11px; margin-top: 2px; }
.badge {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.62);
  color: #fff;
}
.off-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 42px;
  height: 42px;
  padding: 0 5px;
  border-radius: 50%;
  background: linear-gradient(160deg, #f6e2a1, #d4af37 55%, #a07c16);
  color: #1a1304;
  font-weight: 800;
  font-size: 11px;
  display: grid;
  place-items: center;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.picwrap { position: relative; }

.searchbar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.searchbar input, .searchbar select, .field input, .field select, .field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  background: #151518;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 16px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%239a9488' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.searchbar select { width: 108px; flex: none; }

.steps { display: grid; gap: 8px; }
.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  min-width: 0;
}
.step > div:last-child { min-width: 0; }
.num {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%;
  background: rgba(212,175,55,.16);
  color: var(--gold-2);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.step b { display: block; font-size: 13px; }
.step span { color: var(--muted); font-size: 12px; }

.field { margin-bottom: 10px; max-width: 100%; min-width: 0; }
.field label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
#recycleForm { max-width: 100%; min-width: 0; }
.about, .me-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.lang-list { display: grid; gap: 8px; margin-top: 8px; }
.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
}
.lang-item.on { border-color: var(--gold); color: var(--gold-2); }

.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tab) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: #101012;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 6;
}
.tab {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.tab svg { width: 22px; height: 22px; }
.tab.on { color: var(--gold-2); }

.status {
  text-align: center;
  color: var(--muted);
  padding: 18px 8px;
  font-size: 13px;
}
.status button { margin-top: 8px; }

.sheet {
  position: absolute;
  inset: 0;
  z-index: 20;
  visibility: hidden;
  pointer-events: none;
}
.sheet.show,
.sheet.closing {
  visibility: visible;
}
.sheet.show { pointer-events: auto; }
.sheet .mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.62);
  opacity: 0;
  transition: opacity .25s ease;
}
.sheet.show .mask { opacity: 1; }
.sheet .panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 92%;
  background: #121214;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-top: 1px solid var(--line);
  transform: translate3d(0, 104%, 0);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}
#detailSheet .panel { height: 92%; }
.sheet.show .panel { transform: translate3d(0, 0, 0); }
.sheet.dragging .panel,
.sheet.dragging .mask { transition: none; will-change: transform; }
.handle {
  flex: none;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 36px;
  background: #121214;
  touch-action: none;
}
.sheet-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 14px calc(18px + var(--safe-b));
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.handle::after {
  content: "";
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: #3a3a40;
}
.swipe {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #0b0b0d;
  touch-action: none;
  margin-bottom: 4px;
}
.swipe-track {
  display: flex;
}
.swipe-card {
  flex: 0 0 100%;
  width: 100%;
  user-select: none;
}
.swipe-card img {
  width: 100%;
  height: min(48vw, 280px);
  object-fit: contain;
  display: block;
  pointer-events: none;
  background: #0b0b0d;
}
.swipe-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 0 4px;
}
.swipe-dots button {
  width: 6px;
  height: 6px;
  border: 0;
  padding: 0;
  border-radius: 99px;
  background: #4a4a52;
}
.swipe-dots button.on {
  width: 16px;
  background: var(--gold);
}
.detail h3 { margin: 0 0 6px; font-size: 18px; }
.price-lg { color: var(--gold-2); font-size: 22px; font-weight: 800; }
.price-orig { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.price-sm { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
.detail-off {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.detail-off .off-mark { position: static; }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 8px; font-size: 13px; margin: 10px 0 14px; }
.kv b { color: var(--muted); font-weight: 500; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; margin-bottom: 12px; }
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tab) + 24px);
  transform: translateX(-50%);
  background: #2a2416;
  color: var(--gold-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  display: none;
  z-index: 30;
  white-space: nowrap;
}

.deal-sheet { z-index: 40; }
.deal-sheet .mask { background: rgba(0,0,0,.78); }
.deal-card {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(120px 80px at 90% 0%, rgba(212,175,55,.35), transparent 70%),
    linear-gradient(180deg, #2a2416, #141416);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 18px 18px;
  text-align: center;
}
.deal-seals {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}
.deal-seal {
  width: 72px;
  height: 72px;
  margin: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, #f6e2a1, #d4af37 55%, #a07c16);
  color: #1a1304;
  font-size: 16px;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(212,175,55,.28);
}
.deal-seal.alt {
  background: linear-gradient(160deg, #e8f6d8, #7cb342 55%, #4e7d1a);
  color: #102006;
}
.deal-card h2 { margin: 0 0 8px; font-size: 22px; }
.deal-card p { margin: 0 0 8px; color: var(--muted); font-size: 13px; line-height: 1.5; }

[dir="rtl"] .row, [dir="rtl"] .chips, [dir="rtl"] .kv { direction: rtl; }

@media (min-width: 500px) {
  body {
    display: grid;
    place-items: center;
    background: #050505;
  }
  .phone {
    height: min(900px, 100dvh);
    border-radius: 28px;
    border: 1px solid #222;
    box-shadow: 0 20px 80px rgba(0,0,0,.6);
  }
}
