:root {
  --bg: #f6f6f2;
  --paper: #ffffff;
  --ink: #1f2328;
  --muted: #6c727a;
  --line: #e4e1d8;
  --brand: #f6bf26;
  --brand-strong: #f09a1a;
  --accent: #1f8a70;
  --danger: #c2412f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #dedbd2;
}

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

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 86px;
  background: var(--bg);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}

.city-chip,
.category,
.tab,
.secondary-btn,
.primary-btn,
.hero-strip button {
  border: 0;
  border-radius: 8px;
}

.video-feed {
  display: grid;
  gap: 14px;
  height: calc(100vh - 156px);
  margin: 16px -6px 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.video-feed::-webkit-scrollbar {
  display: none;
}

.video-card {
  position: relative;
  min-height: calc(100vh - 172px);
  overflow: hidden;
  border-radius: 8px;
  background: #161616;
  color: #fff;
  scroll-snap-align: start;
}

.video-card img {
  width: 100%;
  height: 100%;
  min-height: calc(100vh - 172px);
  object-fit: cover;
  opacity: 0.8;
}

.video-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.75));
}

.video-info {
  position: absolute;
  right: 78px;
  bottom: 24px;
  left: 14px;
}

.video-info strong {
  display: block;
  margin-bottom: 8px;
  color: #ffd45d;
  font-size: 24px;
}

.video-info h2 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.35;
}

.video-info p {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.55;
}

.video-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.video-tags span {
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 12px;
}

.video-actions {
  position: absolute;
  right: 12px;
  bottom: 26px;
  display: grid;
  gap: 12px;
}

.video-actions button {
  display: grid;
  place-items: center;
  width: 52px;
  min-height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 900;
}

.message-head {
  margin-top: 18px;
}

.message-head h2 {
  margin-bottom: 5px;
  font-size: 22px;
}

.message-head span {
  color: var(--muted);
}

.message-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.message-list button {
  position: relative;
  width: 100%;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 72px 13px 13px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.message-list strong,
.message-list span {
  display: block;
}

.message-list span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.message-list em {
  position: absolute;
  top: 13px;
  right: 13px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.city-chip {
  padding: 8px 12px;
  background: #202020;
  color: #fff;
}

.city-chip.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.search-panel {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.search-panel input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
}

.search-panel button,
.close-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #ece8dc;
  color: #555;
  font-size: 20px;
}

.hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #ecd18c;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff4c2, #fffaf0);
}

.hero-strip strong,
.hero-strip span {
  display: block;
}

.hero-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.hero-strip button {
  flex: 0 0 auto;
  padding: 9px 10px;
  background: var(--ink);
  color: #fff;
}

.category-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 16px -14px 0;
  padding: 0 14px 4px;
  scrollbar-width: none;
}

.category-row::-webkit-scrollbar {
  display: none;
}

.category {
  flex: 0 0 auto;
  padding: 9px 13px;
  background: var(--paper);
  color: #3b3b3b;
  border: 1px solid var(--line);
}

.category.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #241800;
  font-weight: 700;
}

.feed-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 18px 0 10px;
}

.feed-header h2 {
  margin: 0;
  font-size: 18px;
}

.feed-header span {
  color: var(--muted);
  font-size: 13px;
}

.product-grid {
  column-count: 2;
  column-gap: 10px;
}

.product-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  text-align: left;
  break-inside: avoid;
}

.product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.82;
  object-fit: cover;
  background: #e8e2d4;
}

.product-body {
  padding: 10px;
}

.product-title {
  display: -webkit-box;
  min-height: 40px;
  margin: 0 0 8px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.45;
}

.product-price {
  color: var(--danger);
  font-size: 19px;
  font-weight: 800;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.level {
  padding: 3px 6px;
  border-radius: 6px;
  background: #e8f4ef;
  color: var(--accent);
  font-weight: 700;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.product-tags span {
  padding: 3px 6px;
  border-radius: 5px;
  background: #f4f1e8;
  color: #5c5140;
  font-size: 11px;
}

.empty-state {
  padding: 36px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state span {
  margin-top: 8px;
  color: var(--muted);
}

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 9px 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.tab {
  min-height: 42px;
  background: transparent;
  color: var(--muted);
}

.tab.active {
  color: var(--ink);
  font-weight: 800;
}

.publish-tab {
  place-self: center;
  width: 54px;
  min-height: 38px;
  background: var(--brand);
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
}

.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: end;
  justify-content: center;
  padding: 18px 10px;
  background: rgba(0, 0, 0, 0.5);
}

.detail-panel.open {
  display: flex;
}

.detail-card,
.publish-card,
.category-card,
.profile-card,
.action-card {
  position: relative;
  width: min(100%, 430px);
  max-height: 92vh;
  overflow: auto;
  border-radius: 8px;
  background: var(--paper);
}

.detail-card img {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: cover;
  background: #eee;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

.detail-content,
.publish-card,
.category-card,
.profile-card,
.action-card {
  padding: 16px;
}

.category-card h2 {
  margin-bottom: 6px;
}

.category-card p {
  margin-bottom: 16px;
  color: var(--muted);
}

.category-list {
  display: grid;
  gap: 10px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  text-align: left;
}

.category-item strong,
.category-item span {
  display: block;
}

.category-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.category-item em {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--brand);
  color: #241800;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-line strong {
  color: var(--danger);
  font-size: 26px;
}

.price-line span,
.detail-meta dt,
.publish-card p {
  color: var(--muted);
}

.detail-content h2 {
  margin: 10px 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.tag-list span {
  padding: 5px 8px;
  border-radius: 6px;
  background: #f2efe7;
  color: #343434;
  font-size: 12px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 0 16px;
}

.detail-meta div {
  padding: 10px;
  border-radius: 8px;
  background: #f7f5ef;
}

.detail-meta dt {
  font-size: 12px;
}

.detail-meta dd {
  margin: 5px 0 0;
  font-weight: 700;
}

.map-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #d8eadf;
  border-radius: 8px;
  background: #eef8f2;
}

.map-strip strong,
.map-strip span {
  display: block;
}

.map-strip span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.map-strip button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--accent);
  color: #fff;
}

.detail-content h3 {
  margin: 16px 0 6px;
  font-size: 15px;
}

.detail-content p {
  color: #3f444a;
  line-height: 1.65;
}

.detail-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 10px;
  padding-top: 12px;
  background: var(--paper);
}

.contact-box {
  margin: 14px 0;
  padding: 13px;
  border-radius: 8px;
  background: #eef8f2;
  border: 1px solid #d8eadf;
}

.contact-box strong,
.contact-box span {
  display: block;
}

.contact-box span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.action-card label {
  display: block;
  margin: 12px 0;
  font-weight: 800;
}

.action-card input,
.action-card textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.secondary-btn,
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
}

.secondary-btn {
  background: #f0eee8;
  color: var(--ink);
}

.primary-btn {
  background: var(--brand-strong);
  color: #1d1606;
}

.primary-btn.full {
  width: 100%;
  margin-top: 6px;
  border: 0;
}

.publish-card label {
  display: block;
  margin: 12px 0;
  color: #31343a;
  font-weight: 700;
}

.publish-card input,
.publish-card select,
.publish-card textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #fff;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 118px;
  margin: 14px 0;
  border: 1px dashed #d1c7a6;
  border-radius: 8px;
  background: #fffaf0;
  color: #5f4a13;
  text-align: center;
}

.upload-box span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.switch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.switch-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f6ef;
  font-weight: 700;
}

.switch-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--brand);
  color: #241800;
  font-size: 24px;
  font-weight: 900;
}

.profile-head h2 {
  margin: 0 0 5px;
  font-size: 19px;
}

.profile-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.profile-stats div {
  padding: 12px 8px;
  border-radius: 8px;
  background: #f7f5ef;
  text-align: center;
}

.profile-stats strong,
.profile-stats span {
  display: block;
}

.profile-stats strong {
  font-size: 22px;
}

.profile-stats span {
  color: var(--muted);
  font-size: 12px;
}

.profile-menu {
  display: grid;
  gap: 9px;
}

.profile-menu button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.profile-menu span,
.profile-menu em {
  display: block;
}

.profile-menu span {
  font-weight: 800;
}

.profile-menu em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

@media (min-width: 700px) {
  .app-shell,
  .tabbar {
    box-shadow: 0 0 28px rgba(0, 0, 0, 0.12);
  }
}
