:root {
  --brand-yellow: #FFD93D;
  --yellow-ink: #211B00;
  --text: #1D2433;
  --text-secondary: #8A9099;
  --bg: #F8F7FC;
  --card: #FFFFFF;
  --border: #E9E7EF;
  --unread: #E53935;
  --online: #19C463;
  --chip: #EEEDF7;
  --chip-text: #5F5E61;
  --muted-fill: #F4F2FD;
  --shadow: 0 4px 20px rgba(29, 36, 51, 0.04);
  --tabbar-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --visual-height: 100dvh;
  --vv-top: 0px;
  --radius: 12px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  overflow-x: hidden;
  background: #f8f7fc;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.4;
  max-width: 100%;
  overscroll-behavior: none;
}

body {
  -webkit-user-select: none;
  user-select: none;
}

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

button,
input,
textarea {
  font: inherit;
  color: inherit;
  -webkit-appearance: none;
  appearance: none;
}

button,
.svc-card,
.msg-row,
.tap-target {
  touch-action: manipulation;
}

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

.tap-target:active,
button:active {
  transform: scale(0.97);
  opacity: 0.9;
}

input,
textarea {
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  -webkit-user-select: text;
  user-select: text;
}

a {
  color: inherit;
  text-decoration: none;
}

#app {
  position: fixed;
  top: var(--vv-top, 0px);
  left: 0;
  width: 100%;
  max-width: 100%;
  height: var(--visual-height, 100dvh);
  overflow: hidden;
  overflow-x: hidden;
  background: var(--bg);
  z-index: 1;
}

#overlays {
  position: fixed;
  top: var(--vv-top, 0px);
  left: 0;
  width: 100%;
  height: var(--visual-height, 100dvh);
  pointer-events: none;
  z-index: 3000;
  overflow: hidden;
}

#overlays.is-open {
  pointer-events: auto;
}
#overlays .mask,
#overlays .sheet,
#overlays .lb,
#overlays .dialog-mask {
  pointer-events: auto;
}

/* App 壳：顶栏 / 中间滚动 / 底栏 */
.app-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

.page-header {
  flex: 0 0 auto;
  z-index: 900;
  padding-top: var(--safe-top);
  background: rgba(248, 247, 252, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.page-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  z-index: 1;
}

.page-scroll::-webkit-scrollbar,
.chat-main::-webkit-scrollbar,
.sheet::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.bottom-nav,
.tabbar {
  flex: 0 0 auto;
  z-index: 1000;
  min-height: 68px;
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: visible;
}

body.kb-open .bottom-nav,
body.kb-open .tabbar,
body.kb-open .pub-foot,
body.kb-open .quick {
  display: none;
}

.ico {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ico svg {
  width: 24px;
  height: 24px;
  display: block;
}

.press:active,
.tab-item:active,
.svc-card:active,
.msg-row:active,
.menu-row:active,
.chip:active,
.icon-btn:active,
.pill:active {
  transform: scale(0.97);
}

.icon-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 999px;
}

.app-page.anim-forward {
  animation: in-right 180ms ease both;
}
.app-page.anim-back {
  animation: in-left 180ms ease both;
}
.app-page.anim-tab {
  animation: fade-in 160ms ease both;
}

@keyframes in-right {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes in-left {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes page-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .app-page,
  .sheet,
  .mask,
  .toast,
  .lb-img {
    animation: none !important;
    transition: none !important;
  }
}

.hide-scroll {
  scrollbar-width: none;
}
.hide-scroll::-webkit-scrollbar {
  display: none;
}

/* ========== Home ========== */
.topbar {
  background: transparent;
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 6px;
  position: relative;
  min-height: calc(52px + var(--safe-top));
}

.city-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 16px;
  font-weight: 600;
  min-height: 44px;
  padding-right: 8px;
}

.brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--unread);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.badge-num {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--unread);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

.rel {
  position: relative;
}

.tabs {
  display: flex;
  gap: 22px;
  padding: 6px 16px 10px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(233, 231, 239, 0.7);
}

.tab {
  position: relative;
  flex-shrink: 0;
  font-size: 16px;
  color: var(--text-secondary);
  padding: 8px 0 10px;
  min-height: 44px;
  font-weight: 400;
}

.tab.is-on {
  color: var(--text);
  font-weight: 600;
}

.tab-line {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 16px;
  height: 4px;
  margin-left: -8px;
  background: var(--brand-yellow);
  border-radius: 999px;
}

.live-dot {
  position: absolute;
  top: 8px;
  right: -8px;
  width: 6px;
  height: 6px;
  background: var(--online);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(25, 196, 99, 0.5);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 6px rgba(25, 196, 99, 0);
  }
}

.search-wrap {
  padding: 14px 16px 0;
}

.search-bar {
  height: 48px;
  background: var(--chip);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 4px 4px 4px 14px;
  gap: 8px;
}

.search-bar input {
  flex: 1;
  min-width: 0;
  height: 40px;
  font-size: 16px;
}

.search-bar input::placeholder {
  color: #a4a8b0;
}

.search-go {
  height: 40px;
  padding: 0 16px;
  background: var(--brand-yellow);
  color: var(--yellow-ink);
  font-weight: 700;
  font-size: 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.chips {
  display: flex;
  gap: 8px;
  padding: 12px 16px 4px;
  overflow-x: auto;
}

.chip {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  background: #e8e7f1;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  display: inline-flex;
  align-items: center;
}

.chip.is-on {
  background: var(--brand-yellow);
  color: var(--yellow-ink);
}

.feed {
  padding: 12px 16px 24px;
  columns: 2;
  column-gap: 12px;
}

.svc-card {
  break-inside: avoid;
  margin-bottom: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: block;
  width: 100%;
  text-align: left;
}

.svc-hit {
  display: block;
  width: 100%;
  text-align: left;
  color: inherit;
}

.cover {
  position: relative;
  overflow: hidden;
  background: var(--chip);
}

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

.ratio-45 {
  aspect-ratio: 4 / 5;
}
.ratio-11 {
  aspect-ratio: 1 / 1;
}
.ratio-34 {
  aspect-ratio: 3 / 4;
}
.ratio-43 {
  aspect-ratio: 4 / 3;
}

.status {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(233, 231, 239, 0.7);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online);
  box-shadow: 0 0 8px rgba(25, 196, 99, 0.55);
}

.dot.off {
  background: #b8bcc4;
  box-shadow: none;
}

.card-body {
  padding: 10px 10px 0;
}

.card-title {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  margin: 0 0 8px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.tag {
  background: #e4e1e6;
  color: #656467;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 10px 8px;
  padding-top: 4px;
  min-height: 44px;
  border-top: 1px solid rgba(233, 231, 239, 0.7);
}

.who {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  color: var(--text-secondary);
  font-size: 10px;
  text-align: left;
}

.who-name {
  max-width: 4.5em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 650;
}

.who img {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.price-hit {
  flex-shrink: 0;
}

.price {
  background: var(--brand-yellow);
  color: var(--yellow-ink);
  border-radius: 8px;
  padding: 2px 6px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  box-shadow: 0 1px 4px rgba(255, 217, 61, 0.35);
}

.price small {
  font-size: 10px;
  font-weight: 700;
}

.price.ghost {
  background: #e8e7f1;
  color: var(--text-secondary);
  box-shadow: none;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
}

.empty {
  column-span: all;
  text-align: center;
  padding: 48px 16px;
  color: var(--text-secondary);
}

.empty h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
}

.empty p {
  margin: 0;
  font-size: 13px;
}

/* ========== Tabbar ========== */
.tabbar {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 6px 8px var(--safe-bottom);
}

.tab-item {
  width: 64px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 600;
}

.tab-item.is-on {
  color: var(--text);
  font-weight: 800;
}

.tab-plus {
  width: 56px;
  height: 56px;
  margin-top: -22px;
  background: var(--brand-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(255, 217, 61, 0.45);
  color: var(--yellow-ink);
}

.tab-plus:active {
  transform: scale(0.93);
}

.tab-item .rel {
  display: flex;
}

/* ========== Detail ========== */
.subhead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 8px;
  background: transparent;
}

.search-mini {
  flex: 1;
  height: 36px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--text-secondary);
}

.search-mini input {
  flex: 1;
  min-width: 0;
  height: 34px;
  font-size: 16px;
}

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

.seller {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 10px;
}

.seller-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--chip);
  border: 1px solid var(--border);
}

.avatar.lg {
  width: 72px;
  height: 72px;
}

.avatar.sm {
  width: 28px;
  height: 28px;
}

.name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.name {
  font-size: 16px;
  font-weight: 650;
}

.verified {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 217, 61, 0.28);
  color: #6d5e00;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.time-meta {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.price-hero {
  padding: 4px 0 8px;
}

.price-hero strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.price-hero span {
  color: var(--text-secondary);
  font-size: 12px;
  margin-left: 4px;
}

.price-hero em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #a4a8b0;
  font-weight: 700;
}

.detail h1 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  margin: 8px 0 12px;
}

.detail-body {
  font-size: 16px;
  line-height: 1.7;
  color: #4a5160;
  margin: 0 0 14px;
  white-space: pre-wrap;
}

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

.meta-row .views {
  color: var(--text-secondary);
  font-size: 12px;
  margin-right: 4px;
}

.pill {
  background: var(--chip);
  color: var(--chip-text);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.pill.hot {
  background: rgba(255, 217, 61, 0.32);
  color: #6d5e00;
  border: 1px solid rgba(255, 217, 61, 0.55);
}

.pay-card {
  margin: 18px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.pay-card h3 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.pay-card p {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.feed-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--chip);
}

.detail-bar {
  flex: 0 0 auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 68px;
  padding: 8px 16px var(--safe-bottom);
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.bar-acts {
  display: flex;
  gap: 8px;
}

.bar-act {
  min-width: 52px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}

.bar-act.is-on {
  color: #c9a000;
}

.bar-btns {
  display: flex;
  flex: 1;
  gap: 10px;
}

.bar-btns .btn {
  flex: 1;
}

.btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.btn-gray {
  background: #e8e7f1;
  color: var(--text);
}

.btn-yellow {
  background: var(--brand-yellow);
  color: var(--yellow-ink);
  box-shadow: 0 2px 8px rgba(255, 217, 61, 0.35);
}

@media (max-width: 380px) {
  .btn {
    padding: 0 12px;
  }
  .bar-act {
    min-width: 44px;
  }
}

.btn-block {
  width: 100%;
  height: 52px;
  font-size: 17px;
}

/* ========== Publish ========== */
.publish-page {
  background: #f4f2fd;
}

.pub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
  background: #f4f2fd;
}

.pub-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  font-weight: 700;
}

.pub-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-btn {
  min-height: 36px;
  padding: 0 8px;
  color: #5f5e61;
  font-size: 13px;
  font-weight: 600;
}

.mini-pub {
  height: 32px;
  padding: 0 14px;
  background: var(--brand-yellow);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--yellow-ink);
}

.pub-main {
  padding: 8px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.add-photo,
.thumb {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.add-photo {
  border: 2px dashed #e4e1ea;
  background: #fafafa;
  color: #b0b4bc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

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

.thumb-x {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(29, 36, 51, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.field-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.title-input {
  width: 100%;
  font-size: 16px;
  font-weight: 650;
  min-height: 36px;
}

.title-input::placeholder,
.body-input::placeholder {
  color: #b0b4bc;
  font-weight: 400;
}

.body-input {
  width: 100%;
  min-height: 140px;
  resize: none;
  font-size: 16px;
  line-height: 1.7;
  color: #4a5160;
}

.hint {
  color: #b0b4bc;
  font-size: 13px;
  line-height: 1.7;
}

.pub-tools {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.loc-btn,
.ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  max-width: 62%;
}

.loc-btn {
  background: #f3f3f5;
  color: #5f5e61;
  overflow: hidden;
}

.loc-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-btn {
  background: #f4edff;
  color: #6b4de6;
  border: 1px solid #eadfff;
}

.row-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 4px 0;
  border-bottom: 1px solid #f4f4f6;
}

.row-line:last-child {
  border-bottom: 0;
}

.row-k {
  font-weight: 700;
}

.row-v {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.row-v.price {
  background: none;
  box-shadow: none;
  color: #e53935;
  font-weight: 700;
  font-size: 15px;
  padding: 0;
}

.unit-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0 8px;
}

.unit-row > span {
  width: 64px;
  flex-shrink: 0;
  color: #5f5e61;
  font-size: 13px;
  padding-top: 8px;
}

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

.unit {
  padding: 8px 14px;
  background: #f6f6f8;
  border-radius: 10px;
  font-size: 13px;
  min-height: 36px;
}

.unit.is-on {
  background: var(--brand-yellow);
  color: var(--yellow-ink);
  font-weight: 700;
}

.pub-foot {
  flex: 0 0 auto;
  z-index: 1000;
  background: #fff;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid #f0eef5;
  text-align: center;
}

.pub-foot small {
  display: block;
  margin-top: 8px;
  color: #b0b4bc;
  font-size: 12px;
}

/* ========== Messages ========== */
.page-title {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
}

.msg-head {
  padding: 12px 16px 10px;
  background: transparent;
}

.msg-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.msg-links {
  display: flex;
  gap: 16px;
  color: var(--text);
  font-size: 14px;
}

.search-round {
  height: 36px;
  background: #e3e1ec;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--text-secondary);
}

.search-round input {
  flex: 1;
  min-width: 0;
  height: 36px;
}

.msg-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: transparent;
  text-align: left;
  border-bottom: 1px solid rgba(233, 231, 239, 0.7);
}

.msg-ava {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.msg-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  text-align: left;
  background: transparent;
}

.msg-ava img,
.msg-ava .sys-ico {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.sys-ico {
  background: var(--brand-yellow);
  color: var(--yellow-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.unread {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--unread);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

.unread.dot {
  min-width: 12px;
  width: 12px;
  height: 12px;
  padding: 0;
}

.msg-mid {
  flex: 1;
  min-width: 0;
}

.msg-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.msg-top b {
  font-size: 16px;
  font-weight: 650;
}

.msg-top time {
  color: var(--text-secondary);
  font-size: 12px;
  flex-shrink: 0;
}

.msg-preview {
  color: var(--text-secondary);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.msg-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(206, 198, 173, 0.35);
}

/* ========== Chat ========== */
.page-chat {
  background: #fff;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 8px;
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.chat-who {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  text-align: left;
}

.chat-who .name {
  font-size: 15px;
}

.chat-who .sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12px;
}

.chat-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #fff;
  padding: 12px 16px 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.chat-svc {
  flex: 0 0 auto;
  padding: 10px 16px 0;
  background: #fff;
}

.svc-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.svc-mini img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.svc-mini h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.svc-mini .subline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
}

.ghost-btn {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #cec6ad;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}

.time-sep {
  text-align: center;
  color: #8d8e90;
  font-size: 12px;
  margin: 8px 0;
}

.bubble-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 10px 0;
}

.bubble-row.me {
  justify-content: flex-end;
}

.bubble-row img.ava {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.bubble.them {
  background: #f4f2fd;
  border: 1px solid #e8e7f1;
  border-bottom-left-radius: 4px;
}

.bubble.me {
  background: var(--brand-yellow);
  color: var(--text);
  border-bottom-right-radius: 4px;
}

.bubble.loc {
  font-weight: 650;
}

.sys {
  text-align: center;
  margin: 12px 0;
}

.sys span {
  display: inline-block;
  background: #e3e1ec;
  color: #5d5e60;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
}

.typing {
  color: var(--text-secondary);
  font-size: 12px;
  padding-left: 44px;
  margin-bottom: 6px;
}

.composer {
  flex: 0 0 auto;
  z-index: 1000;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 8px 12px calc(10px + var(--safe-bottom));
}

.quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.quick button {
  flex-shrink: 0;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #cec6ad;
  background: #f4f2fd;
  border-radius: 999px;
  font-size: 12px;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.grow {
  flex: 1;
  min-width: 0;
  background: #f4f2fd;
  border: 1px solid #e3e1ec;
  border-radius: 999px;
  height: 40px;
  padding: 0 14px;
}

.grow:focus-within {
  border-color: #c9b24a;
}

.grow input {
  width: 100%;
  height: 38px;
  font-size: 16px;
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-yellow);
  color: var(--yellow-ink);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plus-panel {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 12px 4px 4px;
}

.plus-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text);
  min-height: 64px;
}

.plus-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== Nearby / Profile ========== */
.seg {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  overflow-x: auto;
}

.seg button {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: #e8e7f1;
  font-size: 13px;
  font-weight: 650;
}

.seg button.is-on {
  background: var(--brand-yellow);
  color: var(--yellow-ink);
}

.near-list {
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.near-card {
  display: flex;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow);
}

.near-card img.cover-sm {
  width: 108px;
  height: 108px;
  object-fit: cover;
  flex-shrink: 0;
}

.near-info {
  padding: 10px 10px 10px 0;
  min-width: 0;
  flex: 1;
}

.near-info h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 650;
}

.profile-hero {
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-hero h2 {
  margin: 2px 0 6px;
  font-size: 20px;
}

.stats {
  display: flex;
  margin: 8px 16px 16px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.stat {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 18px;
  font-weight: 800;
}

.stat span {
  color: var(--text-secondary);
  font-size: 12px;
}

.menu {
  margin: 0 16px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.menu-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 16px;
  text-align: left;
  border-bottom: 1px solid #f4f4f6;
  font-size: 15px;
}

.menu-row:last-child {
  border-bottom: 0;
}

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

/* ========== Overlays ========== */
.mask {
  position: absolute;
  inset: 0;
  background: rgba(29, 36, 51, 0.45);
  animation: fade 200ms ease;
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3000;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(16px + var(--safe-bottom));
  animation: sheet-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 86%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@keyframes sheet-in {
  from { transform: translateY(100%); }
  to { transform: none; }
}

.handle {
  width: 36px;
  height: 4px;
  background: #e0dee8;
  border-radius: 999px;
  margin: 6px auto 14px;
}

.sheet h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.sheet-item {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px;
  font-size: 16px;
  border-bottom: 1px solid #f4f4f6;
  text-align: left;
}

.sheet-item:last-child {
  border-bottom: 0;
}

.sheet-cancel {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  background: #f4f2fd;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 650;
}

.check {
  color: #c9a000;
  font-weight: 800;
}

.toast {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  background: rgba(29, 36, 51, 0.88);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 650;
  z-index: 4000;
  animation: fade 150ms ease;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}

.dialog-mask {
  position: absolute;
  inset: 0;
  z-index: 5000;
  background: rgba(29, 36, 51, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dialog {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  padding: 22px 18px 14px;
  text-align: center;
}

.dialog h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.dialog p {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.dialog-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog-btns button {
  min-height: 44px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 650;
}

.dialog-btns .pri {
  background: var(--brand-yellow);
}

.dialog-btns .ghost {
  background: #f4f2fd;
}

.success-ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--brand-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.price-sheet .yen {
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 4px;
  justify-content: center;
  margin: 8px 0 16px;
}

.price-sheet input {
  font-size: 32px;
  font-weight: 800;
  width: 160px;
  text-align: left;
}

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

.key {
  height: 48px;
  background: #f4f2fd;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 650;
}

.ai-box textarea {
  width: 100%;
  min-height: 88px;
  background: #f8f7fc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  resize: none;
  margin-bottom: 12px;
}

.comment {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f4f4f6;
}

.comment p {
  margin: 4px 0 0;
  color: #4a5160;
  font-size: 14px;
}

.lb {
  position: absolute;
  inset: 0;
  background: #111;
  z-index: 5000;
  display: flex;
  flex-direction: column;
}

.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(8px + var(--safe-top)) 8px 8px;
  color: #fff;
}

.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.lb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.muted {
  color: var(--text-secondary);
  font-size: 13px;
}

.notice {
  margin: 16px;
  background: #fff8d9;
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
}

hr.hair {
  border: 0;
  border-top: 1px solid #f4f4f6;
  margin: 8px 0;
}

.file-hidden {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.publish-page {
  background: #f4f2fd;
}

.publish-page .page-header {
  background: #f4f2fd;
}

.share-hint {
  margin: 8px 0 12px;
  padding: 12px;
  background: #fff8d9;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

.chat-svc .svc-mini {
  margin-bottom: 0;
}

.page-header.thin {
  min-height: 0;
  background: transparent;
}

.chat-loose {
  margin: 0 0 4px;
  padding: 10px 12px;
  background: #f8f7fc;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 650;
  color: var(--text);
}

.avatar-hit {
  display: block;
  border-radius: 50%;
}

/* ========== 个人主页 ========== */
.user-page {
  position: relative;
  background: var(--bg);
}

.user-page-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 920;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px;
  padding-top: calc(var(--safe-top) + 4px);
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.38), transparent);
  transition: background 180ms ease;
}

.user-page-header > * {
  pointer-events: auto;
}

.user-page-header .icon-btn {
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
}

.user-page-header.is-solid {
  background: rgba(248, 247, 252, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.user-page-header.is-solid .icon-btn {
  color: var(--text);
  background: transparent;
}

.u-head-right {
  display: flex;
  align-items: center;
}

.user-cover {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: #2a2a32;
}

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

.user-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.user-identity {
  position: relative;
  margin-top: -28px;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 0 16px 16px;
}

.u-ava-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.user-ava {
  width: 80px;
  height: 80px;
  margin-top: -40px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
  flex-shrink: 0;
}

.u-id {
  flex: 1;
  min-width: 0;
  padding-bottom: 4px;
}

.u-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.u-online {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.u-hero-btns {
  display: flex;
  gap: 10px;
  margin: 14px 0 12px;
}

.u-hero-btns .btn {
  flex: 1;
}

.btn-follow {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.u-social {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 4px 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.u-social b {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  margin-right: 4px;
}

.u-social button {
  min-height: 44px;
  color: inherit;
}

.u-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.u-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(238, 237, 247, 0.9);
  color: #5f5e61;
  font-size: 12px;
  font-weight: 600;
}

.u-chip.more {
  background: transparent;
  color: var(--text-secondary);
  min-height: 28px;
}

.u-bio {
  margin: 12px 0 14px;
  font-size: 14px;
  line-height: 1.7;
  color: #3a4150;
  white-space: pre-wrap;
}

.u-bio button {
  margin-left: 6px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
}

.u-feat {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
}

.feat-card {
  min-height: 92px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  text-align: left;
  overflow: hidden;
}

.feat-card.credit {
  background: #fff6c2;
  border-color: #ffe98a;
}

.feat-card h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.feat-card b {
  display: block;
  margin: 6px 0 4px;
  font-size: 15px;
  font-weight: 800;
}

.feat-card p {
  margin: 0;
  font-size: 11px;
  color: #6d5e00;
  line-height: 1.4;
}

.feat-card img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  margin-top: 6px;
}

.profile-tabs {
  position: sticky;
  top: calc(var(--safe-top) + 48px);
  z-index: 100;
  display: flex;
  gap: 4px;
  padding: 4px 12px 0;
  background: rgba(248, 247, 252, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.u-tab {
  flex: 1;
  min-height: 44px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text-secondary);
  position: relative;
}

.u-tab.is-on {
  color: var(--text);
  font-weight: 800;
}

.u-tab.is-on::after {
  content: "";
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--brand-yellow);
}

.u-filters {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  overflow-x: auto;
}

.u-filter {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-text);
  font-size: 12px;
  font-weight: 700;
}

.u-filter.is-on {
  background: var(--brand-yellow);
  color: var(--yellow-ink);
}

.post-feed {
  padding: 12px 16px 24px;
}

.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}

.post-card p {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.6;
}

.post-card img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.post-meta button {
  min-height: 36px;
  font-weight: 700;
  color: var(--text-secondary);
}

.post-meta button.is-on {
  color: #c9a000;
}

.rev-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 8px;
}

.rev-score {
  min-width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #fff6c2;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.rev-score b {
  font-size: 28px;
  font-weight: 800;
}

.rev-score span {
  color: #c9a000;
  font-size: 16px;
}

.rev-head h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.rev-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.rev-list {
  padding: 0 16px 24px;
}

.rev-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}

.rev-top {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.rev-stars {
  color: #c9a000;
  font-size: 12px;
  letter-spacing: 1px;
}

.rev-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #3a4150;
}

.user-action-bar {
  flex: 0 0 auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 68px;
  padding: 8px 12px var(--safe-bottom);
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.user-action-bar .btn {
  flex: 1;
}

.user-action-bar .bar-act {
  flex: 0 0 auto;
}

.credit-rows {
  background: #f8f7fc;
  border-radius: 14px;
  overflow: hidden;
}

.credit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #efeef6;
  font-size: 14px;
}

.credit-row:last-child {
  border-bottom: 0;
}

.edit-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.edit-photo {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 88px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.edit-photo img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--chip);
}

.edit-photo.cover img {
  width: 100%;
  height: 64px;
  border-radius: 12px;
}

body.kb-open .user-action-bar {
  display: none;
}
