:root {
  --ink: #000000;
  --ink-2: #1a1a1a;
  --paper: #FFFFFF;
  --line: #E5E5E5;
  --line-2: #F0F0F0;
  --mute: #999999;
  --mute-2: #CCCCCC;
  --placeholder: #F5F5F5;
  --danger: #000000;
  --shadow: 0 1px 3px rgba(0,0,0,0.04);
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body { min-height: 100vh; margin: 0; }

/* 衬线字体：仅用于编号和数字 */
.serif {
  font-family: 'Times New Roman', 'Songti SC', 'STSong', serif;
  font-weight: 400;
}

.num {
  font-family: 'Times New Roman', serif;
  font-weight: 400;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* 视图切换 */
.view { display: none; }
.view.active { display: block; }

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-mark {
  width: 24px;
  height: 24px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: 'Times New Roman', serif;
  font-weight: 400;
}
.brand-name {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.topbar-right {
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.1em;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.topbar-right:hover { color: var(--ink); }

/* 进度 */
.progress-bar {
  padding: 0 20px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.progress-text {
  font-size: 11px;
  color: var(--mute);
  white-space: nowrap;
  letter-spacing: 0.05em;
}
.progress-text .num { color: var(--ink); font-size: 13px; margin: 0 2px; }
.progress-track {
  flex: 1;
  height: 1px;
  background: var(--line);
  position: relative;
}
.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  background: var(--ink);
  transition: width .5s ease;
}

/* 分类 */
.cat-nav {
  position: sticky;
  top: 53px;
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.cat-nav-inner {
  padding: 10px 20px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.pill {
  font-size: 12px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
}
.pill:hover { border-color: var(--ink); }
.pill.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* 主内容 */
.main {
  padding: 20px;
  max-width: 720px;
  margin: 0 auto;
}

/* 网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 12px;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 24px 16px; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* 卡片 */
.card {
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  font-family: inherit;
  width: 100%;
  outline: none;
}
.card-photo {
  aspect-ratio: 3 / 4;
  background: var(--placeholder);
  position: relative;
  margin-bottom: 10px;
  overflow: hidden;
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Times New Roman', 'Songti SC', serif;
  font-size: 48px;
  font-weight: 300;
  color: var(--mute-2);
  letter-spacing: 0.05em;
  line-height: 1;
  user-select: none;
}
.card-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: transform .15s ease;
}
.card-heart:hover { transform: scale(1.1); }
.card-heart svg { width: 14px; height: 14px; stroke: var(--ink); fill: none; stroke-width: 1.5; }
.card-heart.active svg { fill: var(--ink); }
.card-name {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-price {
  font-size: 12px;
  color: var(--ink);
  font-family: 'Times New Roman', serif;
}
.card-tag {
  font-size: 10px;
  color: var(--mute);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* 底部按钮 */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, var(--paper) 60%, rgba(255,255,255,0));
  z-index: 30;
}
.btn-primary {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  display: block;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 14px 20px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .2s ease;
}
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }
.btn-primary:not(:disabled):hover { background: var(--ink-2); }

.btn-ghost {
  width: 100%;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 14px 20px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* 抽屉 */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  visibility: hidden;
  transition: visibility 0s linear .4s;
}
.drawer.open { visibility: visible; transition: visibility 0s linear 0s; }
.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity .4s ease;
}
.drawer.open .drawer-mask { opacity: 1; }
.drawer-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--paper);
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.drawer.open .drawer-body { transform: translateY(0); }
.drawer-head {
  position: sticky;
  top: 0;
  background: var(--paper);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.drawer-title {
  font-size: 10px;
  color: var(--mute);
  letter-spacing: 0.2em;
}
.drawer-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  color: var(--ink);
}
.drawer-content { padding: 20px; }

/* 表单 */
.field {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 10px 0;
  font-size: 15px;
  color: var(--ink);
  font-family: inherit;
  font-weight: 400;
  outline: none;
}
.field:focus { border-bottom-color: var(--ink); }
.field::placeholder { color: var(--mute); }
.field-label {
  display: block;
  font-size: 10px;
  color: var(--mute);
  letter-spacing: 0.2em;
  margin-bottom: 4px;
}

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: 0.05em;
  z-index: 100;
  pointer-events: none;
}

/* 步骤指示 */
.step {
  padding: 16px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
}
.step-back {
  background: none;
  border: none;
  color: var(--mute);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.step-back:hover { color: var(--ink); }
.step-label {
  font-size: 10px;
  color: var(--mute);
  letter-spacing: 0.2em;
}

/* 海报 */
.poster {
  width: 320px;
  margin: 0 auto;
  background: var(--paper);
  padding: 24px;
  border: 1px solid var(--line);
  font-family: 'Times New Roman', 'Songti SC', serif;
}
.poster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.poster-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.poster-mark {
  width: 24px;
  height: 24px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.poster-name {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.poster-sub {
  font-size: 7px;
  color: var(--mute);
  letter-spacing: 0.3em;
  margin-top: 1px;
}
.poster-meta { text-align: right; }
.poster-meta-label { font-size: 7px; color: var(--mute); letter-spacing: 0.3em; }
.poster-meta-val { font-size: 10px; margin-top: 1px; }

.poster-body { padding: 20px 0 12px; }
.poster-eyebrow {
  font-size: 8px;
  color: var(--mute);
  letter-spacing: 0.3em;
  margin-bottom: 6px;
}
.poster-title {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--ink);
}
.poster-items {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  margin-bottom: 12px;
}
.poster-item {
  aspect-ratio: 3 / 4;
  background: var(--placeholder);
  overflow: hidden;
}
.poster-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.poster-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.poster-tag {
  font-size: 8px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.poster-qr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}
.poster-qr img {
  width: 64px;
  height: 64px;
  background: var(--paper);
  display: block;
}
.poster-qr-text { flex: 1; min-width: 0; }
.poster-qr-label {
  font-size: 7px;
  color: var(--mute);
  letter-spacing: 0.3em;
  margin-bottom: 4px;
}
.poster-qr-desc { font-size: 10px; line-height: 1.5; }

.poster-footer {
  text-align: center;
  padding-top: 12px;
  font-size: 7px;
  color: var(--mute);
  letter-spacing: 0.3em;
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--mute);
}
.empty-title {
  font-size: 16px;
  color: var(--ink);
  margin-bottom: 6px;
}
.empty-sub { font-size: 12px; }

/* 响应式 */
@media (min-width: 640px) {
  .topbar-inner, .progress-bar, .cat-nav-inner, .main, .step, .bottom-bar, .drawer-content {
    padding-left: 32px;
    padding-right: 32px;
  }
}
