/* ==========================================================================
   校园车网 · 样式
   ========================================================================== */

:root {
  --brand: #ff4d2e;
  --brand-dark: #e63a16;
  --brand-2: #ff7a45;
  --brand-soft: #fff2ee;
  --ink: #16181f;
  --ink-2: #5b6172;
  --ink-3: #9aa0ae;
  --line: #eef0f4;
  --bg: #f4f5f7;
  --card: #ffffff;
  --green: #13b98a;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, .04), 0 4px 12px rgba(20, 24, 40, .05);
  --shadow-md: 0 8px 30px rgba(20, 24, 40, .10);
  --tab-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

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

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

.hidden {
  display: none !important;
}

/* ------------------------------ 顶栏 ------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: calc(var(--safe-t) + 14px) 16px 16px;
  background: linear-gradient(135deg, #ff5c33 0%, #ff3d5e 100%);
  color: #fff;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 6px 20px rgba(255, 77, 46, .22);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .2);
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .28);
  flex: none;
}

.brand-logo svg {
  width: 22px;
  height: 22px;
}

.brand-text h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .5px;
}

.brand-text p {
  margin: 1px 0 0;
  font-size: 11.5px;
  opacity: .86;
  letter-spacing: .2px;
}

.brand-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .26);
  font-weight: 600;
  white-space: nowrap;
}

.searchbar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 0 14px;
  height: 42px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
}

.searchbar svg {
  width: 17px;
  height: 17px;
  color: var(--ink-3);
  flex: none;
}

.searchbar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
  min-width: 0;
}

.searchbar input::placeholder {
  color: #b3b8c4;
}

.searchbar .clear-btn {
  color: var(--ink-3);
  font-size: 17px;
  line-height: 1;
  padding: 4px;
}

/* ------------------------------ 分类条 ---------------------------------- */

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 20px 4px 16px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  padding: 9px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
  white-space: nowrap;
  min-height: 36px;
}

.chip.active {
  background: linear-gradient(135deg, #ff5c33, #ff3d5e);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 77, 46, .3);
}

/* ------------------------------ 排序行 ---------------------------------- */

.sortbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.sortbar .count {
  font-size: 12.5px;
  color: var(--ink-3);
}

.sortbar .count b {
  color: var(--brand);
  font-size: 14px;
}

.sorts {
  display: flex;
  gap: 4px;
  background: #fff;
  padding: 3px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.sorts button {
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 600;
  transition: all .18s;
}

.sorts button.active {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ------------------------------ 商品网格 -------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 16px calc(var(--tab-h) + var(--safe-b) + 24px);
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease;
  animation: cardIn .32s ease both;
}

.card:active {
  transform: scale(.975);
}

@keyframes cardIn {
  from {
    transform: translateY(8px);
  }

  to {
    transform: none;
  }
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f0f1f4;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 46px;
  filter: saturate(1.1);
}

.tone-1 {
  background: linear-gradient(135deg, #ffd9cf, #ffb3a0);
}

.tone-2 {
  background: linear-gradient(135deg, #cfe4ff, #a9c9ff);
}

.tone-3 {
  background: linear-gradient(135deg, #d6f5e3, #a8e6c9);
}

.tone-4 {
  background: linear-gradient(135deg, #e8dcff, #c9b6ff);
}

.tone-5 {
  background: linear-gradient(135deg, #ffecc9, #ffd48a);
}

.tone-6 {
  background: linear-gradient(135deg, #d3f0f7, #a3ddec);
}

.media-tag {
  position: absolute;
  left: 8px;
  top: 8px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(22, 24, 31, .55);
  color: #fff;
  backdrop-filter: blur(6px);
  letter-spacing: .3px;
}

.media-sold {
  position: absolute;
  inset: 0;
  background: rgba(22, 24, 31, .5);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 2px;
}

.card-body {
  padding: 9px 10px 11px;
}

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.38;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.card-price {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.card-price .now {
  color: var(--brand);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.2px;
}

.card-price .now i {
  font-style: normal;
  font-size: 11.5px;
  margin-right: 1px;
}

.card-price .was {
  font-size: 11px;
  color: var(--ink-3);
  text-decoration: line-through;
}

.card-meta {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-3);
  overflow: hidden;
  white-space: nowrap;
}

.card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d3d7df;
  flex: none;
}

.cond-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: #ff8a00;
  background: #fff6e8;
  padding: 1.5px 6px;
  border-radius: 5px;
  flex: none;
}

/* ------------------------------ 空状态 ---------------------------------- */

.empty {
  padding: 60px 30px;
  text-align: center;
  color: var(--ink-3);
}

.empty .ico {
  font-size: 46px;
  margin-bottom: 10px;
  opacity: .9;
}

.empty h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--ink-2);
  font-weight: 600;
}

.empty p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
}

/* ------------------------------ 骨架屏 ---------------------------------- */

.skeleton {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sk-line,
.sk-box {
  background: linear-gradient(90deg, #f0f1f4 25%, #f7f8fa 37%, #f0f1f4 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

.sk-box {
  aspect-ratio: 1 / 1;
}

.sk-line {
  height: 11px;
  border-radius: 6px;
  margin: 9px 10px;
}

.sk-line.short {
  width: 55%;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

/* ------------------------------ 底部导航 -------------------------------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 600;
  height: 100%;
  justify-content: center;
  transition: color .16s;
}

.tab svg {
  width: 21px;
  height: 21px;
}

.tab.active {
  color: var(--brand);
}

.tab-center {
  display: flex;
  justify-content: center;
}

.publish-fab {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5c33, #ff3d5e);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(255, 77, 46, .4);
  margin-top: -22px;
  border: 4px solid #fff;
  transition: transform .16s;
}

.publish-fab:active {
  transform: scale(.93);
}

.publish-fab svg {
  width: 24px;
  height: 24px;
}

/* ------------------------------ 详情弹层 -------------------------------- */

.sheet-mask {
  position: fixed;
  inset: 0;
  background: rgba(14, 16, 22, .45);
  z-index: 90;
  opacity: 0;
  animation: fadeIn .22s ease forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 95;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  animation: sheetUp .3s cubic-bezier(.22, .8, .3, 1) forwards;
  overflow: hidden;
}

@keyframes sheetUp {
  to {
    transform: translateY(0);
  }
}

.sheet.closing {
  animation: sheetDown .22s ease forwards;
}

@keyframes sheetDown {
  to {
    transform: translateY(100%);
  }
}

.sheet-head {
  position: absolute;
  top: calc(var(--safe-t) + 10px);
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}

.round-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(22, 24, 31, .5);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}

.round-btn svg {
  width: 18px;
  height: 18px;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;
}

.carousel {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: #f0f1f4;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel .slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 4 / 3.4;
  max-height: 62vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.carousel .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel .slide .thumb-fallback {
  font-size: 90px;
}

.dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  transition: all .2s;
}

.dots span.on {
  width: 16px;
  border-radius: 3px;
  background: #fff;
}

.detail {
  padding: 16px 16px 0;
}

.price-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.price-row .now {
  color: var(--brand);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -1px;
  line-height: 1;
}

.price-row .now i {
  font-style: normal;
  font-size: 17px;
  margin-right: 2px;
}

.price-row .was {
  font-size: 12.5px;
  color: var(--ink-3);
  text-decoration: line-through;
  margin-bottom: 3px;
}

.price-row .sold-tag {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--line);
  padding: 3px 9px;
  border-radius: 6px;
}

.detail h2 {
  margin: 10px 0 0;
  font-size: 18px;
  line-height: 1.42;
  font-weight: 700;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 7px;
  background: #f4f5f7;
  color: var(--ink-2);
}

.tag.brand {
  background: var(--brand-soft);
  color: var(--brand);
}

.section {
  margin-top: 20px;
  border-top: 8px solid var(--bg);
  margin-left: -16px;
  margin-right: -16px;
  padding: 16px 16px 4px;
}

.section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 700;
  letter-spacing: .4px;
}

.section .desc {
  font-size: 14.5px;
  line-height: 1.75;
  color: #33363f;
  white-space: pre-wrap;
  word-break: break-word;
}

.seller {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fafbfc;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.seller .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd9cf, #ffb3a0);
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
}

.seller-info {
  flex: 1;
  min-width: 0;
}

.seller-info b {
  font-size: 14px;
  display: block;
}

.seller-info span {
  font-size: 12px;
  color: var(--ink-3);
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-btn {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brand);
  background: #fff;
  border: 1px solid #ffd5c9;
  padding: 7px 13px;
  border-radius: 999px;
  flex: none;
}

.safety {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.7;
  background: #fafbfc;
  border-radius: 12px;
  padding: 11px 13px;
  margin-bottom: 16px;
}

.action-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px calc(10px + var(--safe-b));
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  z-index: 6;
}

.action-bar .icon-btn {
  width: 46px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--ink-3);
}

.action-bar .icon-btn svg {
  width: 21px;
  height: 21px;
}

.action-bar .icon-btn.active {
  color: var(--brand);
}

.btn-primary {
  flex: 1;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff5c33, #ff3d5e);
  color: #fff;
  font-weight: 700;
  font-size: 15.5px;
  box-shadow: 0 6px 16px rgba(255, 77, 46, .28);
  transition: transform .14s;
}

.btn-primary:active {
  transform: scale(.98);
}

.btn-ghost {
  flex: 1;
  height: 46px;
  border-radius: 14px;
  background: #f4f5f7;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 15px;
}

/* ------------------------------ 全屏页面 -------------------------------- */

.page {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  animation: slideIn .26s cubic-bezier(.22, .8, .3, 1) forwards;
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

.page.closing {
  animation: slideOut .2s ease forwards;
}

@keyframes slideOut {
  to {
    transform: translateX(100%);
  }
}

.page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-t) + 12px) 16px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.page-head h2 {
  margin: 0;
  font-size: 16.5px;
  font-weight: 700;
  flex: 1;
  text-align: center;
}

.page-head .back {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--ink);
  flex: none;
}

.page-head .back svg {
  width: 20px;
  height: 20px;
}

.page-head .head-action {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand);
  flex: none;
  min-width: 34px;
  text-align: right;
}

.page-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(30px + var(--safe-b));
}

/* ------------------------------ 表单 ------------------------------------ */

.form-block {
  background: #fff;
  border-radius: var(--radius);
  margin: 12px 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.form-block>.label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-2);
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-block>.label em {
  color: var(--brand);
  font-style: normal;
}

.form-block>.label .counter {
  margin-left: auto;
  font-weight: 500;
  color: var(--ink-3);
  font-size: 11.5px;
}

.uploader {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.up-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #f6f7f9;
  border: 1.5px dashed #dfe3e9;
  display: grid;
  place-items: center;
  color: var(--ink-3);
}

.up-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.up-cell .plus {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
}

.up-cell .plus svg {
  width: 22px;
  height: 22px;
}

.up-cell .del {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(22, 24, 31, .62);
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  font-weight: 700;
}

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.field:last-child {
  border-bottom: none;
  padding-bottom: 2px;
}

.field>span.k {
  font-size: 14px;
  color: var(--ink-2);
  flex: none;
  width: 74px;
}

.field input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  min-width: 0;
}

.field input::placeholder {
  color: #c2c7d0;
}

.field .unit {
  font-size: 12.5px;
  color: var(--ink-3);
  flex: none;
}

.price-input {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex: 1;
}

.price-input .rmb {
  color: var(--brand);
  font-weight: 800;
  font-size: 17px;
}

.price-input input {
  font-weight: 700;
  font-size: 19px;
  color: var(--brand);
}

textarea.desc-input {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 16px;
  line-height: 1.7;
  min-height: 96px;
  background: transparent;
}

textarea.desc-input::placeholder {
  color: #c2c7d0;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  padding: 7px 13px;
  border-radius: 999px;
  background: #f5f6f8;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all .16s;
}

.pill.on {
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: inset 0 0 0 1.2px #ffc9ba;
}

.form-tip {
  margin: 14px 16px 0;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.7;
  padding: 0 4px;
}

.submit-bar {
  position: sticky;
  bottom: 0;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0));
}

/* ------------------------------ 我的 ------------------------------------ */

.profile-card {
  margin: 12px 16px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff5c33, #ff3d5e);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 77, 46, .26);
}

.profile-card .row1 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-card .avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .3);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex: none;
}

.profile-card b {
  font-size: 16.5px;
  font-weight: 700;
}

.profile-card .sub {
  font-size: 11.5px;
  opacity: .85;
  margin-top: 2px;
}

.profile-stats {
  display: flex;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

.profile-stats div {
  flex: 1;
  text-align: center;
}

.profile-stats b {
  font-size: 19px;
  font-weight: 800;
  display: block;
}

.profile-stats span {
  font-size: 11px;
  opacity: .84;
}

.seg {
  display: flex;
  margin: 14px 16px 0;
  background: #fff;
  border-radius: 12px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}

.seg button {
  flex: 1;
  padding: 9px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-3);
  transition: all .16s;
}

.seg button.on {
  background: var(--brand-soft);
  color: var(--brand);
}

.my-list {
  padding: 12px 16px calc(var(--tab-h) + var(--safe-b) + 20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.my-item {
  display: flex;
  gap: 11px;
  background: #fff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow-sm);
  align-items: center;
}

.my-item .pic {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  flex: none;
  background: #f0f1f4;
}

.my-item .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-item .pic .thumb-fallback {
  font-size: 30px;
}

.my-item .info {
  flex: 1;
  min-width: 0;
}

.my-item .info b {
  font-size: 13.5px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.my-item .info .p {
  color: var(--brand);
  font-weight: 800;
  font-size: 15px;
  margin-top: 4px;
}

.my-item .info .s {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}

.my-item .ops {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: none;
}

.op-btn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f4f5f7;
  color: var(--ink-2);
  white-space: nowrap;
}

.op-btn.danger {
  background: #fff0ef;
  color: #e8443a;
}

.op-btn.ok {
  background: var(--brand-soft);
  color: var(--brand);
}

/* ------------------------------ Toast ---------------------------------- */

.toast-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--tab-h) + var(--safe-b) + 26px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(22, 24, 31, .9);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 999px;
  max-width: 78vw;
  text-align: center;
  animation: toastIn .24s ease both;
  backdrop-filter: blur(10px);
}

.toast.out {
  animation: toastOut .2s ease forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.96);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ---------------------- 大屏：收成一根竖屏手机栏 ------------------------- */

@media (min-width: 700px) {
  html {
    background: #eceef2;
  }

  body {
    background:
      radial-gradient(900px 520px at 12% -6%, #ffe3d8 0%, rgba(255, 227, 216, 0) 62%),
      radial-gradient(820px 500px at 90% 2%, #dde8ff 0%, rgba(221, 232, 255, 0) 58%),
      #eceef2;
    min-height: 100vh;
  }

  #app {
    width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    box-shadow:
      0 0 0 1px rgba(20, 24, 40, .05),
      0 0 40px rgba(20, 24, 40, .10),
      0 24px 80px rgba(20, 24, 40, .10);
    position: relative;
  }

  .topbar {
    border-radius: 0;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tabbar {
    width: 430px;
    left: 50%;
    right: auto;
    margin-left: -215px;
  }

  .sheet,
  .page {
    width: 430px;
    left: 50%;
    right: auto;
    margin-left: -215px;
  }
}



/* ------------------------------ 登录 / 注册 ----------------------------- */

.white-btn {
  font-size: 12.5px;
  font-weight: 700;
  color: #ff4d2e;
  background: #fff;
  padding: 7px 13px;
  border-radius: 999px;
  flex: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
}

.white-btn.ghost {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, .3);
}

.auth-hero {
  text-align: center;
  padding: 26px 24px 6px;
}

.auth-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff5c33, #ff3d5e);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 77, 46, .3);
}

.auth-logo svg {
  width: 30px;
  height: 30px;
}

.auth-hero h3 {
  margin: 0 0 5px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .5px;
}

.auth-hero p {
  margin: 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.auth-seg {
  margin-top: 18px;
}

.auth-err {
  margin: 10px 20px 0;
  font-size: 12.5px;
  color: #e8443a;
  text-align: center;
  min-height: 17px;
}

/* ---------------------- 付费解锁联系方式 ---------------------- */

.pay-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(14, 16, 22, .55);
  animation: fadeIn .2s ease;
}

.pay-card {
  position: relative;
  width: 100%;
  max-width: 350px;
  max-height: 92vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  animation: payIn .26s cubic-bezier(.22, .8, .3, 1);
}

@keyframes payIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(.97);
  }
}

.pay-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--ink-3);
  font-size: 20px;
  line-height: 1;
  background: #f4f5f7;
}

.pay-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}

.pay-sub {
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  margin: 10px 0 12px;
  color: var(--brand);
  font-weight: 800;
}

.pay-price i {
  font-style: normal;
  font-size: 18px;
}

.pay-price span {
  font-size: 34px;
  letter-spacing: -1px;
}

.pay-qr {
  border-radius: 14px;
  overflow: hidden;
  background: #f6f7f9;
  margin-bottom: 14px;
}

.pay-qr img {
  width: 100%;
  display: block;
}

.pay-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.75;
}

.pay-steps b {
  color: var(--brand);
}

.pay-tip {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.6;
}

.unlock-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff2ee, #ffe7e0);
  border: 1px dashed #ffc0ad;
  color: var(--brand);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.unlock-btn.pending {
  background: #f4f5f7;
  border-color: #dfe3e9;
  color: var(--ink-3);
}

.contact-locked {
  letter-spacing: 1px;
  color: var(--ink-3) !important;
}
