/* 个人主页 — 闲鱼结构；文字统一墨色，彩色只留给背景/按钮 */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

body.is-profile {
  --pcb-green: #1ecf8a;
  --pcb-green-deep: #0c3d2e;
  --pcb-green-soft: #e8f8f0;
  --pcb-copper: #e8943a;
  --pcb-gold: #f0c84a;
  --pcb-mask: #12a86a;
  --xy-cta: var(--pcb-green);
  --xy-cta-text: #0c3d2e;
  --xy-price: #0c3d2e;
  --xy-bg: #eef8f2;
  --xy-card: #ffffff;
  --xy-text: #0c3d2e;
  --xy-muted: rgba(12, 61, 46, 0.62);
  --xy-on-dark: #ffffff;
  --xy-line: rgba(12, 61, 46, 0.1);
  --xy-radius: 10px;
  background: var(--xy-bg);
  color: var(--xy-text);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.is-profile #app {
  max-width: 480px;
  padding: 0 0 88px;
  margin: 0 auto;
}

body.is-profile .top {
  margin: 0;
  background: rgba(12, 61, 46, 0.92);
  color: var(--xy-on-dark);
  border-bottom: 1px solid rgba(94, 255, 176, 0.18);
  backdrop-filter: blur(10px);
}

body.is-profile .top .logo-text {
  color: var(--xy-on-dark);
  text-shadow: none;
}

body.is-profile .quota-chip {
  color: var(--xy-on-dark);
}

body.is-profile .top .ghost {
  background: var(--pcb-green);
  border: none;
  color: var(--xy-cta-text);
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
}

.xy-profile {
  background: #fff;
  padding: 16px 14px 12px;
}

.xy-profile__row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.xy-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(94, 255, 176, 0.55), transparent 55%),
    linear-gradient(180deg, #1ecf8a, #0c3d2e);
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(12, 61, 46, 0.18);
  overflow: hidden;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.xy-avatar img {
  width: 82%;
  height: 82%;
  object-fit: contain;
  filter: brightness(1.05);
}

.xy-profile__meta {
  min-width: 0;
  flex: 1;
}

.xy-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--xy-text);
}

.xy-bio {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--xy-text);
  line-height: 1.4;
  opacity: 0.72;
}

.xy-credit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(30, 207, 138, 0.14);
  color: var(--xy-text);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(30, 207, 138, 0.35);
}

.xy-credit--off {
  background: #f0f0f0;
  color: var(--xy-text);
  opacity: 0.55;
  border-color: transparent;
}

.xy-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--xy-line);
  text-align: center;
}

.xy-metric strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--xy-text);
}

.xy-metric span {
  font-size: 11px;
  color: var(--xy-text);
  opacity: 0.62;
}

.xy-toolbar {
  display: flex;
  gap: 8px;
  padding: 0 14px 12px;
  background: #fff;
}

.xy-toolbar .primary,
.xy-toolbar .ghost,
.xy-toolbar a.primary,
.xy-toolbar a.ghost {
  flex: 1;
  margin: 0;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 8px;
  font-weight: 700;
  font-size: 13px;
}

.xy-toolbar .primary,
.xy-toolbar a.primary {
  background: linear-gradient(180deg, #5dffb0, #1ecf8a);
  color: var(--xy-text);
  border: none;
  box-shadow: 0 4px 12px rgba(30, 207, 138, 0.35);
}

.xy-toolbar .ghost,
.xy-toolbar a.ghost {
  background: var(--pcb-green-soft);
  color: var(--xy-text);
  border: 1px solid rgba(30, 207, 138, 0.25);
}

.xy-tabs {
  display: flex;
  gap: 0;
  background: #fff;
  margin-top: 8px;
  border-bottom: 1px solid var(--xy-line);
  position: sticky;
  top: 52px;
  z-index: 15;
}

.xy-tab {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--xy-text);
  opacity: 0.55;
  background: none;
  border: none;
  border-radius: 0;
  position: relative;
}

.xy-tab.is-active {
  color: var(--xy-text);
  opacity: 1;
}

.xy-tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 3px;
  margin-left: -14px;
  background: var(--pcb-green);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 0 8px rgba(30, 207, 138, 0.55);
}

.xy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 10px 16px;
}

.xy-card {
  background: var(--xy-card);
  border-radius: var(--xy-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(30, 207, 138, 0.12);
  box-shadow: 0 2px 10px rgba(12, 61, 46, 0.06);
}

.xy-card__cover {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(160deg, #0c3d2e, #12a86a 55%, #1ecf8a);
  overflow: hidden;
}

.xy-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.xy-card__cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.xy-card__score {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 1;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--xy-text);
  font-size: 11px;
  font-weight: 700;
}

.xy-card__body {
  padding: 8px 8px 10px;
  display: grid;
  gap: 6px;
}

.xy-card__title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.xy-card__price {
  color: var(--xy-text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.xy-card__price small {
  font-size: 12px;
  margin-right: 1px;
}

.xy-card__meta {
  font-size: 11px;
  color: var(--xy-text);
  opacity: 0.62;
}

.xy-card__ops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 2px;
}

.xy-card__ops .btn-mini {
  flex: 1;
  font-size: 11px;
  padding: 5px 0;
  border-radius: 6px;
  background: var(--pcb-green-soft);
  border: none;
  color: var(--xy-text);
}

.xy-empty {
  grid-column: 1 / -1;
  margin: 24px 12px;
  padding: 36px 16px;
  text-align: center;
  background: #fff;
  border-radius: var(--xy-radius);
}

.xy-empty h3 {
  margin: 0 0 8px;
  font-size: 15px;
  color: var(--xy-text);
}

.xy-empty p {
  margin: 0 0 16px;
  color: var(--xy-text);
  opacity: 0.72;
  font-size: 13px;
}

.xy-empty .primary {
  display: inline-block;
  background: linear-gradient(180deg, #5dffb0, #1ecf8a);
  color: var(--xy-text);
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 700;
  text-decoration: none;
}

.xy-foot-note {
  padding: 4px 14px 20px;
  font-size: 11px;
  color: var(--xy-text);
  opacity: 0.62;
  text-align: center;
  line-height: 1.5;
}

.xy-gate {
  margin: 10px;
  padding: 16px;
  background: #fff;
  border-radius: var(--xy-radius);
}

.xy-gate h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--xy-text);
}

.xy-gate .primary {
  background: linear-gradient(180deg, #5dffb0, #1ecf8a) !important;
  color: var(--xy-text) !important;
  border: none !important;
  font-weight: 700;
}

.btn-touch {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  background: var(--pcb-green-soft);
  border: 1px solid rgba(30, 207, 138, 0.22);
  color: var(--xy-text);
  text-decoration: none;
  cursor: pointer;
}
.btn-touch--primary {
  background: linear-gradient(180deg, #5dffb0, #1ecf8a);
  border: none;
  color: var(--xy-text);
}
.btn-touch--danger {
  background: var(--pcb-green-soft);
  border-color: rgba(12, 61, 46, 0.18);
  color: var(--xy-text);
}
.btn-touch:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-around;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 4px 0 calc(4px + env(safe-area-inset-bottom, 0));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--xy-line, rgba(12, 61, 46, 0.1));
  backdrop-filter: blur(12px);
  box-sizing: border-box;
}
.tabbar a {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--xy-text, #0c3d2e);
  opacity: 0.55;
  font-size: 11px;
  font-weight: 500;
  padding: 8px 4px;
  min-height: 52px;
  box-sizing: border-box;
}
.tabbar__ico {
  display: grid;
  place-items: center;
  line-height: 0;
  color: inherit;
}
.tabbar__ico svg {
  display: block;
  width: 22px;
  height: 22px;
}
.tabbar a.is-active {
  color: var(--xy-text, #0c3d2e);
  opacity: 1;
  font-weight: 700;
}
.tabbar a.is-active .tabbar__ico {
  color: inherit;
}

.dxs-toast-host {
  position: fixed;
  left: 50%;
  bottom: calc(72px + env(safe-area-inset-bottom, 0));
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 360px);
}
.dxs-toast {
  background: rgba(6, 40, 32, 0.92);
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 24px rgba(6, 40, 32, 0.25);
}
.dxs-toast.is-in {
  opacity: 1;
  transform: none;
}

.dxs-sheet {
  border: none;
  border-radius: 16px 16px 0 0;
  padding: 0;
  margin: auto 0 0;
  width: 100%;
  max-width: 480px;
}
.dxs-sheet::backdrop {
  background: rgba(6, 40, 32, 0.45);
}
.dxs-sheet__card {
  margin: 0;
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0));
  background: #fff;
}
.dxs-sheet__card h3 { margin: 0 0 12px; }
.dxs-sheet__card label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--xy-text);
}
.dxs-sheet__card input {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--xy-line);
  font-size: 16px;
}
.dxs-sheet__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.dxs-sheet__actions .primary,
.dxs-sheet__actions .ghost {
  min-height: 48px;
  width: 100%;
  margin: 0;
}

.xy-contact-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom, 0));
  z-index: 28;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--xy-line);
  backdrop-filter: blur(10px);
}
.xy-contact-bar .primary,
.xy-contact-bar .ghost {
  min-height: 48px;
  margin: 0;
  width: 100%;
  border-radius: 999px;
  font-weight: 700;
}
body.has-contact-bar #app {
  padding-bottom: 150px;
}

body.is-profile .xy-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
  background: #fff;
}

.dxs-share-dialog {
  border: none;
  border-radius: 16px;
  padding: 0;
  max-width: 92vw;
  width: 360px;
}
.dxs-share-dialog::backdrop {
  background: rgba(6, 40, 32, 0.45);
}
.dxs-share-card {
  margin: 0;
  padding: 18px 16px 16px;
}
.dxs-share-card h3 {
  margin: 0 0 6px;
  font-size: 18px;
}
.dxs-share-qr {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  min-height: 180px;
}
.dxs-share-poster {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(12, 61, 46, 0.12);
}
.dxs-share-poster.hidden {
  display: none;
}

.xy-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 12px;
}
.xy-list-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--xy-card, #fff);
  border-radius: var(--xy-radius, 10px);
  border: 1px solid var(--xy-line, rgba(12, 61, 46, 0.1));
  text-decoration: none;
  color: inherit;
  min-height: 72px;
}
.xy-list-row--static { cursor: default; }
.xy-list-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--pcb-green-soft, #e8f8f0);
  flex-shrink: 0;
}
.xy-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xy-list-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.xy-list-main strong { font-size: 14px; }
.xy-list-main span {
  font-size: 12px;
  color: var(--xy-text);
  opacity: 0.62;
}
.hidden { display: none !important; }

.auth-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 8px;
}
.auth-actions .primary,
.auth-actions .ghost {
  width: 100%;
  min-height: 48px;
  margin: 0;
}

.cta-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.cta-stack .primary {
  min-height: 52px;
  font-size: 16px;
}

/* 骨架屏 */
.xy-skel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px;
}
.xy-skel-card {
  background: #fff;
  border-radius: var(--xy-radius, 10px);
  overflow: hidden;
  border: 1px solid var(--xy-line, rgba(12, 61, 46, 0.1));
}
.xy-skel {
  background: linear-gradient(90deg, #e8f0eb 25%, #f4faf6 37%, #e8f0eb 63%);
  background-size: 400% 100%;
  animation: xy-skel-shine 1.2s ease-in-out infinite;
  border-radius: 6px;
}
.xy-skel--cover {
  aspect-ratio: 1;
  border-radius: 0;
}
.xy-skel--line {
  height: 12px;
  margin: 10px 10px 6px;
}
.xy-skel--short {
  width: 55%;
  margin-bottom: 12px;
}
.xy-skel--thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
}
.xy-skel-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}
.xy-skel-row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--xy-line, rgba(12, 61, 46, 0.1));
}
.xy-skel-row__main {
  flex: 1;
  min-width: 0;
}
@keyframes xy-skel-shine {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* 检测后上架引导 */
.publish-guide {
  margin: 14px 0 12px;
  padding: 14px 14px 16px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(30, 207, 138, 0.16), rgba(232, 148, 58, 0.12)),
    #fff;
  border: 1px solid rgba(30, 207, 138, 0.35);
}
.publish-guide strong {
  display: block;
  font-size: 15px;
  color: var(--xy-text, #0c3d2e);
  margin-bottom: 6px;
}
.publish-guide p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--xy-text, #0c3d2e);
  opacity: 0.72;
  line-height: 1.45;
}
.publish-guide .primary {
  width: 100%;
  min-height: 48px;
}
.showcase-publish.is-spotlight {
  outline: 2px solid var(--pcb-green, #1ecf8a);
  outline-offset: 4px;
  border-radius: 12px;
  transition: outline-color 0.3s ease;
}
