:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #17181a;
  --muted: #7a7f87;
  --line: #e8eaee;
  --brand: #ff5000;
  --brand-soft: #fff1eb;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f11;
    --card: #181a1d;
    --text: #f2f3f5;
    --muted: #9096a0;
    --line: #26292e;
    --brand: #ff6a2b;
    --brand-soft: #2a1a12;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}

.hero { padding: 8px 4px 18px; }

.hero h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.hero .sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.list {
  display: grid;
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-main {
  display: flex;
  gap: 14px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
}

.thumb {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: var(--brand-soft);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.price {
  color: var(--brand);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.badge {
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

.badge.sold {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.card-foot {
  border-top: 1px solid var(--line);
  padding: 10px 14px;
}

.btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 14px;
  border-radius: 11px;
  transition: transform .06s ease, opacity .15s ease;
}

.btn:active { transform: scale(.985); opacity: .9; }

.btn.disabled {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  pointer-events: none;
}

.empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 48px 0;
}

.foot {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.foot p { margin: 4px 0; }

.updated { opacity: .75; }

.skeleton {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  height: 128px;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

@media (min-width: 560px) {
  .hero h1 { font-size: 28px; }
  .thumb { flex-basis: 112px; width: 112px; height: 112px; }
}
