:root {
  --green: #07c160;
  --green-dark: #06ad56;
  --green-light: #b2e8c9;
  --orange: #ff6600;
  --orange-banner: #fff7e6;
  --red: #fa5151;
  --text: #191919;
  --text-secondary: #888;
  --text-muted: #b2b2b2;
  --bg: #f7f7f7;
  --white: #fff;
  --border: #ededed;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 50px;
  --header-h: 44px;
  --phone-w: 390px;
  --phone-h: 844px;
}

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

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", sans-serif;
  background: #e8e8e8;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* Phone shell */
.phone {
  width: min(100%, var(--phone-w));
  height: min(92vh, var(--phone-h));
  background: var(--bg);
  border-radius: 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-status {
  height: 28px;
  background: var(--white);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text);
}

.app-main {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}

.screen.active {
  display: flex;
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
}

.screen-scroll.no-tab {
  padding-bottom: 16px;
}

/* Nav bar */
.nav-bar {
  height: var(--header-h);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  border-bottom: 0.5px solid var(--border);
}

.nav-bar .back {
  position: absolute;
  left: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  font-size: 22px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.nav-bar .title {
  font-size: 17px;
  font-weight: 600;
  max-width: 60%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-bar .title-dropdown::after {
  content: "▾";
  font-size: 10px;
  margin-left: 4px;
  color: var(--text-secondary);
}

.nav-capsule {
  position: absolute;
  right: 8px;
  display: flex;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  overflow: hidden;
  height: 28px;
}

.nav-capsule span {
  width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #333;
  background: rgba(255, 255, 255, 0.9);
}

.nav-capsule span + span {
  border-left: 1px solid #e5e5e5;
}

/* Bottom tab */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--white);
  border-top: 0.5px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  z-index: 100;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 6px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 10px;
  cursor: pointer;
  gap: 2px;
}

.tab-item .icon {
  font-size: 22px;
  line-height: 1;
}

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

.tab-item.center-tab {
  position: relative;
  top: -12px;
}

.tab-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
}

/* Lists */
.section-title {
  padding: 12px 16px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.section-hint {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  background: #f5f5f5;
}

.cell-group {
  background: var(--white);
  margin-bottom: 8px;
}

.cell {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  min-height: 52px;
}

.cell:last-child {
  border-bottom: none;
}

.cell:active {
  background: #f9f9f9;
}

.cell-label {
  flex: 1;
  font-size: 16px;
}

.cell-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.cell-value {
  font-size: 14px;
  color: var(--text-secondary);
  margin-right: 4px;
}

.cell-value.danger {
  color: var(--red);
}

.cell-arrow {
  color: #c8c8c8;
  font-size: 14px;
}

.badge-hot {
  display: inline-block;
  background: var(--red);
  color: white;
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

.badge-pill {
  display: inline-block;
  background: #fff3e0;
  color: #ff9800;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

/* Tabs horizontal */
.tabs {
  display: flex;
  background: var(--white);
  border-bottom: 0.5px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
}

.tabs .tab {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
}

.tabs .tab.active {
  color: var(--green);
  font-weight: 600;
}

.tabs .tab.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--green);
  border-radius: 2px;
}

/* Banner */
.tip-banner {
  background: var(--orange-banner);
  padding: 8px 12px;
  font-size: 12px;
  color: #d48806;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.tip-banner .btn-link {
  color: var(--green);
  border: none;
  background: none;
  font-size: 12px;
  cursor: pointer;
}

/* Empty state */
.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  background: linear-gradient(145deg, #e8e8e8, #f5f5f5);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

/* Buttons */
.btn-primary {
  display: block;
  width: calc(100% - 32px);
  margin: 16px auto;
  padding: 14px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:active {
  background: var(--green-dark);
}

.btn-fixed-bottom {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 16px);
  left: 16px;
  right: 16px;
  z-index: 10;
}

.screen.has-fixed-btn .screen-scroll {
  padding-bottom: 80px;
}

/* Search */
.search-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--white);
  align-items: center;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 8px 12px;
  gap: 8px;
}

.search-box input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  outline: none;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text);
  border: none;
  background: none;
  cursor: pointer;
}

/* Feed card */
.feed-card {
  background: var(--white);
  margin: 8px 12px;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.feed-card-tap {
  cursor: pointer;
}

.feed-card-tap:active {
  opacity: 0.92;
}

/* Home feed · 竞品差距补齐 */
.home-top-bar {
  background: var(--white);
  padding: 6px 12px 10px;
  flex-shrink: 0;
  border-bottom: 0.5px solid var(--border);
}

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

.home-brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2d4a7c, #3d8b7a);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-brand-name {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
}

.home-capsule {
  margin-left: auto;
}

.home-search-tap {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: #f5f5f5;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}

.home-search-placeholder {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--orange-banner);
  font-size: 12px;
  color: #8a6d3b;
  flex-shrink: 0;
}

.oa-banner.is-hidden {
  display: none;
}

.oa-banner-text {
  flex: 1;
  line-height: 1.35;
}

.oa-banner-btn {
  border: 1px solid #e6c88a;
  background: #fff;
  color: #b8860b;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

.oa-banner-close {
  border: none;
  background: none;
  font-size: 18px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
}

.tabs-home {
  position: relative;
  padding-right: 72px;
}

.tab-coupon-link {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 14px;
  color: var(--green);
  cursor: pointer;
  padding: 8px 4px;
}

.home-category-bar {
  flex-shrink: 0;
  background: var(--white);
  border-bottom: 0.5px solid var(--border);
  padding: 0 12px 8px;
}

.category-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.chip-filter {
  flex-shrink: 0;
  border: none;
  background: #f5f5f5;
  color: var(--text-secondary);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
}

.chip-filter.active {
  background: rgba(7, 193, 96, 0.12);
  color: var(--green);
  font-weight: 500;
}

.feed-leader-text {
  flex: 1;
  min-width: 0;
}

.tag-inline {
  margin-left: 6px;
}

.btn-feed-subscribe {
  flex-shrink: 0;
  border: 1px solid var(--green);
  color: var(--green);
  background: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
}

.btn-feed-subscribe.subscribed {
  border-color: var(--border);
  color: var(--text-secondary);
  background: #f7f7f7;
}

.feed-published {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 6px 0 4px;
}

.feed-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.feed-stats-muted {
  color: var(--text-muted);
}

.feed-resell-strip {
  font-size: 12px;
  color: #b45309;
  background: #fffbeb;
  padding: 6px 8px;
  border-radius: 8px;
  margin: -4px 0 8px;
  line-height: 1.4;
}

.feed-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 0.5px solid var(--border);
}

.btn-feed-action {
  flex: 1;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
}

.btn-feed-action.primary {
  border-color: var(--green);
  color: var(--green);
  font-weight: 500;
}

.thumb-video {
  position: relative;
  background: linear-gradient(135deg, #333, #666);
}

.thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 22px;
}

.fab-cart {
  position: absolute;
  right: 16px;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-size: 22px;
  cursor: pointer;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab-cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 16px;
  text-align: center;
}

#screen-home .feed-leader {
  align-items: center;
}

.tab-icon-wrap {
  position: relative;
  display: inline-block;
}

.tab-dot {
  position: absolute;
  top: -2px;
  right: -6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  border: 1px solid var(--white);
}

.feed-card.feed-filter-hidden {
  display: none;
}

.home-recommend-strip {
  background: var(--white);
  border-bottom: 0.5px solid var(--border);
}

.recommend-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 12px 10px;
  -webkit-overflow-scrolling: touch;
}

.recommend-chips .chip-filter {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: #fafafa;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.flash-sale-banner {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, #fff1f0, #fff7e6);
  color: #c41d1d;
  font-size: 13px;
  font-weight: 500;
}

.group-buy-block {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f6ffed;
  border-radius: 8px;
  border: 1px solid #b7eb8f;
}

.group-buy-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.group-buy-bar {
  height: 8px;
  background: #e8e8e8;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.group-buy-bar span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 4px;
}

.jielong-line {
  font-size: 13px;
  padding: 8px 10px;
  background: #fafafa;
  border-radius: 8px;
  margin-bottom: 6px;
  color: var(--text);
}

.share-rebate-strip {
  margin: 12px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.btn-mini-green {
  border: 1px solid var(--green);
  color: var(--green);
  background: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
}

.order-card {
  background: var(--white);
  margin: 8px 12px;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.order-card-tap {
  cursor: pointer;
}

.order-card-tap:active {
  opacity: 0.92;
}

.order-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
}

.order-card-head .order-status {
  margin-left: auto;
  color: var(--green);
  font-weight: 500;
}

.order-card-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.order-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.order-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
}

.order-card-row span:first-child {
  color: #fa6400;
  font-size: 16px;
  font-weight: 600;
}

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

.order-card-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 0.5px solid var(--border);
}

.order-card-foot .btn-mini {
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
}

.order-card-foot .btn-mini.primary {
  border-color: var(--green);
  color: var(--green);
}

.order-detail-leader {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--white);
  border-bottom: 0.5px solid var(--border);
}

.order-detail-leader .switch-role {
  margin-left: auto;
}

.order-detail-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 0.5px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  box-sizing: border-box;
}

.order-detail-actions button {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 12px 10px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
}

.order-detail-actions .btn-primary:not(.btn-secondary) {
  background: var(--green);
  color: #fff;
  border: none;
}

.order-detail-actions .btn-primary.btn-secondary {
  background: var(--white);
  color: var(--green);
  border: 1px solid var(--green);
}

.feed-leader {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.feed-avatar {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.feed-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #ffd591;
  color: var(--orange);
}

.price {
  color: var(--orange);
  font-size: 20px;
  font-weight: 700;
}

.thumb-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.thumb {
  flex: 1;
  aspect-ratio: 1;
  background: #eee;
  border-radius: 6px;
}

/* Profile header */
.profile-header {
  background: var(--white);
  padding: 16px;
}

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

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #e3f2fd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.profile-name {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
}

.profile-badge {
  font-size: 11px;
  color: var(--text-secondary);
  border: 1px solid #ddd;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 0.5px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
}

.profile-stats strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.func-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--white);
  margin-top: 8px;
}

.func-item {
  text-align: center;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
}

.func-item .fi {
  font-size: 24px;
  margin-bottom: 6px;
}

.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 8px;
  background: var(--white);
  margin-top: 8px;
}

.profile-func-head + .func-grid {
  margin-top: 0;
  padding-top: 4px;
}

/* Product form */
.form-section {
  background: var(--white);
  margin-bottom: 8px;
  padding: 0 0 8px;
}

.form-section-title {
  padding: 12px 16px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-field {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border);
  gap: 12px;
}

.form-field label {
  width: 88px;
  flex-shrink: 0;
  font-size: 15px;
  color: var(--text);
}

.form-field input,
.form-field select,
.form-field textarea {
  flex: 1;
  border: none;
  font-size: 15px;
  outline: none;
  background: transparent;
  text-align: right;
  color: var(--text);
}

.form-field textarea {
  text-align: left;
  min-height: 72px;
  resize: none;
}

.form-field .placeholder-hint {
  flex: 1;
  text-align: right;
  color: var(--text-muted);
  font-size: 15px;
}

.form-field-media {
  flex-direction: column;
  align-items: stretch;
}

.media-upload {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.media-slot {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px dashed #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-muted);
}

.sku-card {
  margin: 0 12px 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 8px;
}

.sku-card h4 {
  font-size: 14px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sku-card .form-field {
  background: var(--white);
  border-radius: 6px;
  margin-bottom: 6px;
  border: none;
}

.sku-card .form-field input {
  text-align: left;
}

.btn-text-link {
  border: none;
  background: none;
  color: var(--green);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 16px;
  display: block;
  width: 100%;
  text-align: center;
}

.form-actions-stacked .btn-primary,
.form-actions-stacked .btn-secondary {
  width: calc(100% - 32px);
  margin: 8px 16px !important;
}

.switch-role {
  font-size: 12px;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 4px 10px;
  border-radius: 14px;
  background: none;
  cursor: pointer;
}

/* Modal */
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-mask.show {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-height: 80%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 12px;
  top: 12px;
  border: none;
  background: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
}

.modal-body {
  padding: 0 16px 16px;
  overflow-y: auto;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.chip {
  padding: 10px 14px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
}

.chip.selected {
  background: #e8f8ef;
  border-color: var(--green);
  color: var(--green);
}

/* Hero pages */
.hero-green {
  background: linear-gradient(180deg, #07c160 0%, #05a850 100%);
  color: white;
  padding: 24px 20px 40px;
  position: relative;
}

.hero-green h1 {
  font-size: 24px;
  margin-bottom: 12px;
}

.hero-green p {
  font-size: 13px;
  opacity: 0.95;
  line-height: 1.6;
}

.steps-card {
  background: white;
  margin: -24px 12px 12px;
  border-radius: 12px;
  padding: 20px 16px;
  position: relative;
  z-index: 1;
}

.steps-card h3 {
  text-align: center;
  color: var(--green);
  font-size: 16px;
  margin-bottom: 20px;
}

.step-item {
  margin-bottom: 20px;
}

.step-item h4 {
  font-size: 14px;
  margin-bottom: 6px;
}

.step-item p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* FAQ */
.faq-quick {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: white;
}

.faq-quick-item {
  flex: 1;
  text-align: center;
  padding: 16px 8px;
  background: #f9f9f9;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.faq-quick-item .fq-icon {
  font-size: 28px;
  color: var(--green);
  margin-bottom: 8px;
}

/* Service footer */
.service-footer {
  padding: 16px;
  background: white;
  margin-top: 8px;
}

.contact-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: var(--green);
  color: white;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  border: none;
  width: 100%;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 20px;
  font-size: 14px;
}

.footer-links a {
  color: var(--green);
  text-decoration: none;
}

.footer-links .sep {
  color: #ddd;
}

.version {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding-bottom: 24px;
}

.link-green {
  text-align: center;
  color: var(--green);
  font-size: 14px;
  padding: 12px;
}

/* Newcomer */
.newcomer-hero {
  background: linear-gradient(180deg, #fff8e6, #fff);
  padding: 16px;
}

.newcomer-hero h1 {
  color: #ff6b00;
  font-size: 20px;
  margin-bottom: 12px;
}

.benefit-row {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: #ff6b00;
  margin-bottom: 16px;
}

.question-block {
  background: white;
  margin: 12px;
  padding: 16px;
  border-radius: 8px;
}

.question-block h3 {
  font-size: 15px;
  margin-bottom: 12px;
}

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

.option-btn {
  padding: 12px;
  background: #f5f5f5;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}

.option-btn.selected {
  background: #e8f8ef;
  border-color: var(--green);
}

.option-full {
  width: 100%;
  margin-bottom: 10px;
  text-align: left;
  padding: 14px;
}

.submit-wrap {
  position: relative;
  margin: 16px;
}

.submit-wrap .reward-tag {
  position: absolute;
  right: 8px;
  top: -8px;
  background: var(--red);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Promo link */
.notice-red {
  background: #fff1f0;
  color: #cf1322;
  font-size: 12px;
  padding: 6px 16px;
  text-align: center;
}

.create-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: white;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
}

.create-item:active {
  background: #f9f9f9;
}

.create-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.create-item h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.create-item p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Scan */
.scan-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: white;
}

.scan-graphic {
  width: 160px;
  height: 200px;
  border: 3px solid #333;
  border-radius: 24px;
  margin-bottom: 24px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-graphic::before {
  content: "▢";
  font-size: 64px;
  color: var(--green);
}

/* Prototype map (desktop helper) */
.proto-map {
  position: fixed;
  right: 16px;
  top: 16px;
  max-width: 280px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  padding: 12px;
  font-size: 12px;
  z-index: 9999;
}

.proto-map h4 {
  margin-bottom: 8px;
  font-size: 13px;
}

.proto-map button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 8px;
  margin-bottom: 4px;
  border: none;
  background: #f5f5f5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}

.proto-map button:hover {
  background: #e8f8ef;
}

@media (max-width: 900px) {
  .proto-map {
    display: none;
  }
}

.role-banner {
  background: #e8f8ef;
  padding: 8px 16px;
  font-size: 12px;
  color: var(--green-dark);
  text-align: center;
  flex-shrink: 0;
}

.role-banner strong {
  font-weight: 600;
}

.leader-only {
  display: none;
}

body.mode-leader .member-only {
  display: none !important;
}

body.mode-leader .leader-only.section-head-row,
body.mode-leader .reseller-only.section-head-row,
body.mode-staff .staff-only.section-head-row {
  display: flex;
}

body.mode-leader .leader-only.func-grid,
body.mode-staff .staff-only.func-grid {
  display: grid;
}

.screen-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 16px;
  background: #f0f0f0;
  font-size: 11px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.meta-badge {
  background: #e8f8ef;
  color: var(--green-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

.screen-note {
  padding: 8px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  background: #fafafa;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}

.stat-row {
  display: flex;
  background: var(--white);
  padding: 12px 8px;
  border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}

.stat-cell {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.stat-cell strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 4px;
}

.btn-secondary {
  background: var(--white) !important;
  color: var(--green) !important;
  border: 1px solid var(--green) !important;
}

.screen-admin .screen-scroll {
  padding: 0;
}

.admin-layout {
  display: flex;
  min-height: 100%;
  font-size: 12px;
}

.admin-side {
  width: 56px;
  background: #001529;
  color: rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
  padding: 8px 4px;
}

.admin-logo {
  font-size: 10px;
  text-align: center;
  padding: 8px 0 12px;
  color: #fff;
  font-weight: 600;
}

.admin-nav {
  display: block;
  width: 100%;
  border: none;
  background: none;
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
  padding: 8px 2px;
  margin-bottom: 4px;
  cursor: pointer;
  border-radius: 4px;
}

.admin-nav.active {
  background: var(--green);
  color: #fff;
}

.admin-main {
  flex: 1;
  padding: 12px;
  background: #f0f2f5;
  overflow-y: auto;
}

.admin-title {
  font-size: 15px;
  margin-bottom: 12px;
}

.admin-module-list {
  list-style: none;
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
}

.admin-module-list li {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 0.5px solid var(--border);
  font-size: 12px;
}

.proto-map details {
  margin-bottom: 8px;
}

.proto-map summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 11px;
  padding: 4px 0;
  color: #333;
}

.proto-map details button {
  margin-left: 4px;
}

.reseller-only,
.staff-only {
  display: none;
}

body.mode-reseller .reseller-only.section-head-row {
  display: flex;
}

body.mode-reseller .reseller-only.func-grid {
  display: grid;
}
