:root {
  --app-bg: #f4f5f9;
  --surface: #ffffff;
  --text: #252d3a;
  --strong: #151922;
  --muted: #8d96a3;
  --line: #eceff3;
  --red: #ef4f45;
  --red-deep: #d73a31;
  --green: #49ad35;
  --blue: #1e9bf0;
  --orange: #ff8a00;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(33, 41, 54, .06);
}

html { background: #e9ebf0; }
body {
  max-width: 480px;
  background: var(--app-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: rgba(239, 79, 69, .12); }
@media (min-width: 481px) {
  body { box-shadow: 0 0 36px rgba(15, 23, 42, .12); }
}

.header {
  height: 56px;
  padding: 0 14px;
  background: #f0f0f2;
  color: var(--strong);
  border-bottom: 1px solid #e4e6ea;
}
.header .h-back {
  width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 26px;
  color: var(--strong);
}
.header .h-title { font-size: 18px; font-weight: 700; }
.header .h-act {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--red);
}
.header .h-act a { color: var(--red) !important; }

.ann-bar {
  height: 38px;
  gap: 8px;
  padding: 0 14px;
  background: var(--surface);
  color: #56606e;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.ann-bar .ann-icon { color: var(--red); }
.ann-bar .ann-text { text-overflow: ellipsis; }

.tab-row {
  top: 56px;
  border-bottom: 1px solid var(--line);
}
.tab-row .tab,
.tab-row .tab-item {
  flex: 1;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 15px;
  position: relative;
}
.tab-row .tab.on,
.tab-row .tab-item.active {
  color: var(--red);
  font-weight: 700;
}
.tab-row .tab.on::after,
.tab-row .tab-item.active::after {
  height: 3px;
  left: 38%;
  right: 38%;
  border-radius: 999px;
  background: var(--red);
}

.post-list { padding: 10px 12px; }
.post-card,
.buy-card,
.form-box,
.my-section,
.my-menu,
.stat-row .stat-item {
  border: 1px solid rgba(229, 232, 238, .9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.post-card { margin-bottom: 10px; }
.post-card .body { padding: 13px 14px; }
.post-card .p-title {
  color: var(--strong);
  font-size: 16px;
  line-height: 1.45;
  margin-bottom: 8px;
}
.post-card .p-meta,
.meta,
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.post-card .p-avatar,
.detail .d-av {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff7a45, var(--red));
  font-size: 12px;
  font-weight: 700;
}
.post-card .p-price {
  color: var(--red);
  font-size: 15px;
  font-weight: 800;
}
.post-card .p-free {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}
.pinned-tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  margin-right: 5px;
  border-radius: 999px;
  background: var(--red);
  font-size: 11px;
  vertical-align: 1px;
}

.detail {
  min-height: calc(100vh - 56px);
  padding-bottom: 8px;
  background: var(--surface);
}
.merchant-strip {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(255, 246, 223, .95), rgba(226, 242, 239, .95));
  border-radius: 0 0 18px 18px;
}
.merchant-copy { flex: 1; min-width: 0; }
.merchant-copy strong {
  display: block;
  color: var(--strong);
  font-size: 16px;
  line-height: 1.25;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.merchant-copy span {
  display: inline-flex;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(239, 79, 69, .55);
  border-radius: 4px;
  color: var(--red-deep);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.seller-home {
  min-width: 76px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--orange);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}
.detail .d-head { padding: 22px 18px 14px; }
.detail .d-title {
  color: var(--strong);
  font-size: 23px;
  line-height: 1.45;
}
.detail .d-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  border: 0;
}
.detail-price {
  margin-left: auto;
  color: var(--red);
  font-weight: 800;
}
.detail .d-tag {
  display: inline-flex;
  align-items: center;
  height: 34px;
  margin-top: 16px;
  padding: 0 14px;
  border-radius: 0 999px 999px 0;
  background: var(--red-deep);
  color: #fff;
  font-weight: 700;
}
.detail .d-content {
  margin: 4px 18px 18px;
  padding: 18px;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  color: #303948;
  font-size: 17px;
  line-height: 1.9;
}
.detail .d-content img {
  height: auto !important;
  border-radius: 8px;
  margin: 8px 0;
}
.detail .d-tag-paid {
  margin-left: 18px;
}
.refund-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff4e6;
  color: #c46400;
  font-size: 12px;
  font-weight: 700;
}
.lock-box {
  margin: 18px;
  padding: 26px 18px;
  border: 1px dashed #b9aa8a;
  border-radius: 10px;
  background: #fffdf8;
  color: #8b7956;
}
.lock-box .lock-label { color: #8b7956; margin-bottom: 10px; font-size: 16px; }
.lock-box .lock-price { color: var(--red); font-size: 28px; font-weight: 800; }
.free-tip {
  margin: 16px 18px;
  text-align: center;
  color: var(--red-deep);
  font-weight: 700;
  font-size: 14px;
}
.detail-paybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 220;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .08);
}
.detail-paybar .pay-note {
  color: var(--red-deep);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 7px;
}
.detail-paybar .pay-action { display: flex; gap: 10px; }
.detail-paybar .pay-action a { flex: 1; }

.bottom-nav {
  height: calc(58px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .06);
}
.bottom-nav a {
  min-height: 58px;
  color: #8b929d;
  font-size: 12px;
  gap: 1px;
}
.bottom-nav a.on { color: var(--red); font-weight: 700; }
.bottom-nav a .nav-icon { font-size: 21px; }

.my-top {
  margin: 12px;
  padding: 18px 16px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.my-top .my-row1 {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.my-top .my-av {
  width: 60px;
  height: 60px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f2f4f8, #dfe5ee);
  color: #344054;
  font-size: 20px;
  font-weight: 800;
}
.my-top .my-main { flex: 1; min-width: 0; }
.my-top .my-name {
  color: var(--strong);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.my-top .my-role {
  margin-top: 7px;
  color: #606a78;
  font-size: 15px;
}
.my-top .my-balance {
  min-width: 82px;
  text-align: right;
}
.my-top .my-balance span {
  display: block;
  color: #8b929d;
  font-size: 13px;
}
.my-top .my-balance strong {
  display: block;
  color: var(--red);
  font-size: 25px;
  line-height: 1.2;
  margin-top: 3px;
}
.my-top .my-nums {
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.my-top .my-nums .num-val {
  color: var(--strong);
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.my-top .my-nums .num-lbl {
  color: var(--muted);
  font-size: 12px;
}
.my-section,
.my-menu {
  margin: 12px;
  overflow: hidden;
}
.my-section-title {
  padding: 16px 16px 8px;
  color: var(--strong);
  font-size: 18px;
  font-weight: 700;
}
.my-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.my-grid a {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text);
  font-size: 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.my-grid a:nth-child(3n) { border-right: 0; }
.admin-grid a {
  min-height: 112px;
  font-weight: 600;
}
.admin-grid .mi-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}
.post-manage-grid .mi-icon {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.post-count-grid {
  border-top: 1px solid var(--line);
}
.post-stat-card {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-right: 1px solid var(--line);
  color: var(--text);
}
.post-stat-card:nth-child(3n) { border-right: 0; }
.post-stat-card strong {
  color: var(--text);
  font-size: 15px;
}
.post-search-box {
  margin: 12px;
  padding: 14px;
  border: 1px solid rgba(229, 232, 238, .9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.post-search-box .form-input { margin-bottom: 10px; }
.post-search-box .btn-red { margin-top: 2px; }
.post-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.post-card-head .p-title {
  flex: 1;
  margin-bottom: 6px;
}
.merchant-post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.merchant-post-meta a {
  margin-left: auto;
  color: var(--red);
  font-weight: 700;
}
.reject-reason {
  margin-top: 6px;
  color: var(--red-deep);
  font-size: 12px;
}
.load-state {
  padding: 6px 0 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.my-menu a {
  min-height: 52px;
  padding: 0 16px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.my-menu a:last-child { border-bottom: 0; }
.my-menu a .mi-arrow { color: #c3c8d0; }
.mi-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: #fff;
  background: linear-gradient(135deg, #ff5b5f, #db263f);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.my-grid .mi-icon { margin-right: 0; }
.mi-yellow { background: linear-gradient(135deg, #ffd44d, #f3a416); }
.mi-purple { background: linear-gradient(135deg, #b986ff, #7b61ff); }
.mi-red { background: linear-gradient(135deg, #ff5b5f, #db263f); }
.mi-green { background: linear-gradient(135deg, #9be83e, #49bf2d); }
.mi-orange { background: linear-gradient(135deg, #ffb238, #ff8617); }
.mi-teal { background: linear-gradient(135deg, #37d4b3, #12a58c); }
.mi-blue { background: linear-gradient(135deg, #4268ff, #1f35a8); }
.my-posts-bar {
  margin: 12px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.my-posts-bar a { padding: 12px 0; color: #697386; font-size: 13px; }
.my-posts-bar a.on { color: var(--red); font-weight: 700; }
.my-posts-bar a .count {
  color: var(--strong);
  font-size: 20px;
  font-weight: 800;
}

.buy-card {
  margin: 12px;
  padding: 24px 18px;
}
.buy-card .buy-amt {
  color: var(--red);
  font-size: 38px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.buy-card .buy-desc { color: var(--muted); font-size: 13px; }
.pay-option {
  min-height: 58px;
  margin: 12px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.pay-option.sel { border-color: rgba(239, 79, 69, .55); }
.pay-option .pay-check {
  width: 20px;
  height: 20px;
  border-color: #cbd1d9;
}
.pay-option.sel .pay-check {
  border-color: var(--red);
  background: radial-gradient(circle at center, var(--red) 45%, transparent 48%);
}
.pay-submit {
  margin: 12px;
}
.pay-status {
  min-height: 22px;
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.btn-red,
.btn-green,
.btn-blue,
.btn-red-sm,
.btn-outline,
.btn-red-outline {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 0;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  transition: opacity .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn-red { width: 100%; background: var(--red); color: #fff; box-shadow: 0 6px 14px rgba(239, 79, 69, .2); }
.btn-green { width: 100%; background: var(--green); color: #fff; box-shadow: 0 6px 14px rgba(73, 173, 53, .2); }
.btn-blue { width: 100%; background: var(--blue); color: #fff; box-shadow: 0 6px 14px rgba(30, 155, 240, .2); }
.btn-red-sm { min-height: 34px; border-radius: 999px; font-size: 13px; background: var(--red); color: #fff; }
.btn-outline,
.btn-red-outline {
  min-height: 34px;
  border: 1px solid var(--red);
  border-radius: 999px;
  color: var(--red);
  background: #fff;
  font-size: 13px;
}
.btn-block { display: flex; width: 100%; }
.btn-red:active,
.btn-green:active,
.btn-blue:active,
.btn-red-sm:active,
.btn-outline:active { transform: scale(.99); opacity: .9; }
.btn-red:disabled,
.btn-green:disabled,
.btn-blue:disabled {
  opacity: .55;
  transform: none;
  box-shadow: none;
}

.form-box {
  margin: 12px;
  padding: 14px;
}
.rich-editor {
  min-height: 180px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #fff;
}
.rich-editor .ql-editor {
  min-height: 180px;
  font-size: 15px;
  line-height: 1.7;
}
.rich-editor-fallback {
  padding: 12px;
  border: 1px solid #dfe3ea;
  outline: none;
  overflow-y: auto;
  line-height: 1.7;
}
.rich-editor-fallback:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 79, 69, .1);
}
.rich-editor-fallback:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}
.check-line {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #4a5362;
  font-size: 14px;
}
.check-line input {
  width: 18px;
  height: 18px;
}
.check-line input:disabled {
  opacity: .55;
}
.check-line em {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.line-form,
.report-form {
  margin: 12px;
  padding: 0;
  background: transparent;
}
.form-label,
.f-label {
  display: block;
  margin-bottom: 6px;
  color: #606a78;
  font-size: 14px;
  font-weight: 600;
}
.form-input,
.form-textarea,
.f-input,
.f-textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: var(--strong);
  font-size: 15px;
}
.form-input:focus,
.form-textarea:focus,
.f-input:focus,
.f-textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 79, 69, .1);
}
.form-textarea,
.f-textarea {
  min-height: 100px;
  resize: vertical;
}
.form-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid #f0f2f5;
}
.form-row span {
  color: #4a5362;
  font-size: 17px;
}
.form-row i {
  color: var(--red);
  font-style: normal;
  margin-right: 5px;
}
.form-row .f-input {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  font-size: 17px;
}
.form-row .f-input:focus { border: 0; box-shadow: none; }
.report-section {
  margin-bottom: 12px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.report-section .section-label {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  color: #697386;
  font-size: 17px;
}
.report-section .f-input,
.report-section .f-textarea {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 14px;
  font-size: 16px;
}
.report-section .f-textarea { min-height: 148px; }
.report-submit { padding: 22px 42px 0; }

.empty-state {
  padding: 58px 16px;
  color: var(--muted);
  font-size: 14px;
}
.badge-sm {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.badge-pend,
.badge-pending { background: #fff3e0; color: #ef7d00; }
.badge-ok,
.badge-approved { background: #eaf7e8; color: #2f8e22; }
.badge-no,
.badge-rejected { background: #ffeded; color: #d7332f; }
.stat-row { gap: 10px; padding: 0 12px 12px; }
.stat-row .stat-item { padding: 14px; }
.stat-row .stat-item .s-num {
  color: var(--strong);
  font-size: 22px;
  font-weight: 800;
}
.stat-row .stat-item .s-label { color: var(--muted); font-size: 12px; }
.modal-mask { background: rgba(0, 0, 0, .5); }
.modal-sheet {
  max-height: 72vh;
  padding: 18px;
  border-radius: 18px 18px 0 0;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.sidebar .nav-link { border-radius: 10px; color: #606a78; }
.sidebar .nav-link.active { color: var(--red); background: rgba(239, 79, 69, .08); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
