/* Website front end: the same paper, ink and deep red used by /download. */
:root {
  --bg: #f8f4ef;
  --paper: #f8f4ef;
  --panel: #fffdfa;
  --soft: #f1e8e2;
  --line: #e7ded5;
  --text: #29231f;
  --muted: #756d67;
  --accent: #773b40;
  --accent-strong: #612b30;
  --accent-soft: #aa777a;
  --accent-tint: #f4e9e6;
  --deep: #29231f;
  --deep-soft: #5f5651;
  --shadow: 0 12px 30px rgba(93, 42, 47, .07);
  --radius: 16px;
  --radius-sm: 12px;
  --directory-purple: #773b40;
  --directory-purple-deep: #612b30;
  --directory-purple-soft: #f4e9e6;
  --directory-bg: #f8f4ef;
  --directory-line: #e7ded5;
  --directory-text: #29231f;
  --directory-muted: #756d67;
}

body.front-body { background: var(--paper); color: var(--text); line-height: 1.6; }
.front-body .site-shell { width: min(1440px, calc(100vw - 64px)); }
.front-body .site-header {
  min-height: 82px;
  background: rgba(248, 244, 239, .96);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
.front-body .site-header-inner { min-height: 82px; gap: clamp(18px, 3vw, 40px); }
.front-body .brand { gap: 12px; color: var(--text); text-decoration: none; }
.site-brand-logo { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; }
.front-body .brand-text strong { color: var(--text); font-size: 23px; font-weight: 600; letter-spacing: .01em; }
.front-body .main-nav { gap: clamp(12px, 2.4vw, 30px); }
.front-body .main-nav a,
.front-body .main-nav .city-trigger {
  min-height: 82px;
  color: #554d48;
  font-size: 15px;
  font-weight: 500;
}
.front-body .main-nav a:hover,
.front-body .main-nav .city-trigger:hover { color: var(--accent); }
.front-body .main-nav a::after,
.front-body .main-nav .city-trigger::after { display: none; }
.front-body .main-nav a[href="/download"] {
  min-height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 9px 18px rgba(93, 42, 47, .13);
}
.front-body .main-nav a[href="/download"]:hover { background: var(--accent-strong); color: #fff; }
.front-body .main-nav .city-trigger span { color: inherit; }
.front-body .header-account { border-color: #b9a9a3; }
.front-body .header-account > span::before,
.front-body .header-account > span::after { border-color: var(--accent); }
.front-body .nav-count { background: var(--accent); }
.front-body .page-shell { padding-top: 34px; }
.front-body .flash { margin: 0 0 20px; border-color: var(--line); border-radius: 12px; box-shadow: none; }
.front-body :is(a, button, input, select, textarea):focus-visible { outline: 3px solid #ae777a; outline-offset: 3px; }
.front-body .page-shell h1,
.front-body .page-shell h2 { font-family: "Songti SC", "Noto Serif CJK SC", serif; color: var(--text); }

/* Shared panels and fields */
.front-body :is(.directory-filter-panel, .directory-results-panel, .directory-account-card, .directory-services-card,
  .exchange-page-head, .exchange-record-card, .exchange-empty, .page-hero, .member-card,
  .auth-card, .auth-brand, .profile-card, .profile-detail-card, .profile-detail-photo,
  .account-page-head, .vip-hero, .vip-plan-card, .vip-process,
  .filter-toolbar, .pagination-wrap, .empty-panel, .city-seo-copy, .landing-city-directory) {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.front-body :is(.hero-panel-clean, .auth-brand, .account-page-head, .vip-hero, .photo-upload-box,
  .profile-preview-item-status) {
  background: var(--panel);
}
.front-body :is(.directory-filter-field, .directory-filter-range, .filter-toolbar input,
  .filter-toolbar select, .stack-form input, .stack-form select, .stack-form textarea,
  .exchange-record-actions input, .profile-exchange-form input) {
  border-color: var(--line);
  border-radius: 10px;
  background: #fffdfa;
  color: var(--text);
}
.front-body :is(.directory-filter-field, .directory-filter-range) { background: #fbf8f5; }
.front-body .directory-filter-form select { background-color: #f3ede8; color: var(--text); }
.front-body .directory-filter-form select:hover { border-color: #c8aaa9; background-color: #f8f2ed; }
.front-body .directory-filter-form select:focus-visible { box-shadow: 0 0 0 3px rgba(119, 59, 64, .14); }
.front-body :is(.btn-primary, .btn-dark, .auth-switch .active) {
  border-color: var(--accent);
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px rgba(93, 42, 47, .13);
}
.front-body :is(.btn-primary, .btn-dark):hover { background: var(--accent-strong); }
.front-body .btn-secondary { border-color: var(--line); border-radius: 11px; background: var(--panel); color: var(--accent); box-shadow: none; }
.front-body :is(.chip, .member-facts span, .directory-member-facts span,
  .profile-detail-trust span, .profile-detail-tags span) {
  border-color: #eadbd6;
  background: var(--accent-tint);
  color: var(--accent-strong);
}
.front-body :is(.member-placeholder, .directory-member-photo > span, .directory-account-avatar > span) {
  background: #d4b3aa;
  color: #fff;
}

/* Member directory */
.front-body .directory-filter-panel { border-radius: 16px; }
.front-body .directory-page-grid { margin-top: 18px; gap: 26px; }
.front-body .directory-sidebar { grid-template-rows: none; align-content: start; gap: 16px; }
.front-body .directory-account-guest,
.front-body .directory-services-card { padding: 18px; }
.front-body .directory-guest-icon { width: 52px; height: 52px; }
.front-body .directory-guest-icon::before { top: 9px; width: 13px; height: 13px; }
.front-body .directory-guest-icon::after { right: 9px; bottom: 8px; left: 9px; height: 14px; }
.front-body .directory-guest-actions { margin-top: 12px; }
.front-body .directory-service-list { height: auto; grid-template-rows: none; }
.front-body .directory-service-list > a { min-height: 64px; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; }
.front-body .directory-service-icon { width: 42px; height: 42px; font-size: 16px; }
.front-body .directory-results-panel { overflow: hidden; }
.front-body .directory-member-grid { height: auto; }
.front-body .directory-results-head { position: static; width: auto; height: auto; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 16px; overflow: visible; clip: auto; white-space: normal; border-bottom: 1px solid var(--line); }
.front-body .directory-results-head h1 { margin: 0; font-family: inherit; font-size: 18px; font-weight: 600; }
.front-body .directory-results-head > span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.front-body .directory-member-card { background: var(--panel); }
.front-body .directory-member-card:hover { background: #fcf6f2; box-shadow: 0 12px 28px rgba(93, 42, 47, .08); }
.front-body .directory-member-photo { border-radius: 12px; background: #eee1d9; }
.front-body .directory-member-name h2,
.front-body .directory-account-name strong,
.front-body .directory-service-list strong { color: var(--text); }
.front-body .directory-member-meta,
.front-body .directory-member-summary,
.front-body .directory-account-copy p,
.front-body .directory-service-list small { color: var(--muted); }
.front-body .directory-guest-actions a,
.front-body .directory-pagination a,
.front-body .directory-pagination span { border-radius: 10px; }
.front-body .directory-service-icon { border-radius: 12px; }
.front-body .directory-service-icon-wechat { background: #c9d7cf; color: #345d4a; }
.front-body .directory-service-icon-vip { background: #f1dfc8; color: #8b6130; }
.front-body .directory-service-icon-selection { background: #eed9d9; color: var(--accent); }
.front-body .directory-service-icon-profile { background: #e7dcd2; color: #745b49; }
.front-body .directory-account-stats strong { color: var(--text); }
.front-body .directory-account-guest h2,
.front-body .directory-services-card h2 { color: var(--text); }
.front-body .directory-badge-vip { background: #a87548; }
.front-body .directory-badge-verified { background: #5f8978; }
.front-body .directory-pagination .active span,
.front-body .directory-pagination span.current { background: var(--accent); border-color: var(--accent); }
.front-body .city-related { margin: 36px 0 10px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.front-body .city-related h2 { margin: 0 0 12px; font-family: inherit; font-size: 16px; font-weight: 600; }
.front-body .city-related-links { display: flex; flex-wrap: wrap; gap: 10px; }
.front-body .city-related-links a { padding: 8px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); }
.front-body .city-related-links a:hover { border-color: #ad7e80; background: var(--accent-tint); }
.front-body .search-page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 10px; }
.front-body .search-page-head h1 { margin: 0; font-family: inherit; font-size: 18px; font-weight: 600; }
.front-body .search-page-head a { color: var(--accent); font-size: 13px; white-space: nowrap; }

/* Detail, account, membership and exchange */
.front-body :is(.exchange-page-head, .account-page-head, .vip-hero) { background: var(--panel); }
.front-body .exchange-record-avatar { border-radius: 10px; background: #eee1d9; }
.front-body .exchange-record-actions input { border-color: var(--line); }
.front-body .profile-detail-facts > div,
.front-body .profile-page-shell .profile-preview-item { border: 1px solid var(--line); background: #fbf8f5; }
.front-body .profile-detail-photo,
.front-body .profile-detail-photo > span { background: #d4b3aa; }
.front-body .profile-detail-photo::after { background: linear-gradient(transparent, rgba(38, 28, 29, .7)); }
.front-body .profile-page-shell .profile-card { border-color: var(--line); background: var(--panel); box-shadow: var(--shadow); }
.front-body .profile-page-shell .interest-chip,
.front-body .profile-page-shell .checkbox-card { border-color: var(--line); background: #fbf8f5; }
.front-body .profile-action { border-radius: 10px; }
.front-body .profile-action-primary,
.front-body .account-page-links a:last-child,
.front-body .vip-plan-card > a,
.front-body .exchange-record-actions button:not(.is-secondary) { background: var(--accent); color: #fff; }
.front-body .vip-plan-card.is-featured { border-color: #ad7e80; box-shadow: 0 16px 35px rgba(93, 42, 47, .13); }
.front-body .vip-current-state { border-color: var(--line); border-radius: 10px; background: #fbf8f5; }
.front-body .vip-current-state.is-active { border-color: #d6b8b5; background: var(--accent-tint); }
.front-body .vip-hero-card { border-radius: 14px; background: var(--accent); box-shadow: 0 18px 36px rgba(93, 42, 47, .18); }
.front-body .vip-plan-recommend { background: var(--accent); }
.front-body .profile-page-shell .photo-upload-box { border-color: var(--line); background: #fbf8f5; }
.front-body .profile-page-shell .interest-chip.is-active { border-color: #ad7e80; background: var(--accent-tint); color: var(--accent-strong); }
.front-body .city-modal-dialog { border-color: var(--line); border-radius: 16px; background: var(--paper); }
.front-body .city-modal-close { border-color: var(--line); border-radius: 10px; }

/* Footer */
.front-body .site-footer { border-top: 1px solid var(--line); background: var(--paper); box-shadow: none; }
.front-body .site-footer-cities-head strong,
.front-body .site-footer-city-group h2 { color: var(--text); }
.front-body .site-footer-city-links a,
.front-body .site-copyright { color: var(--muted); }
.front-body .site-footer-city-links a:hover { color: var(--accent); }

@media (max-width: 1080px) {
  .front-body .site-shell { width: calc(100vw - 40px); }
  .front-body .site-header-inner { gap: 18px; }
  .front-body .main-nav { gap: 18px; }
}
@media (max-width: 760px) {
  .front-body .site-shell { width: calc(100vw - 32px); }
  .front-body .site-header { min-height: 0; }
  .front-body .site-header-inner { min-height: 74px; padding: 10px 0 0; }
  .site-brand-logo { width: 38px; height: 38px; flex-basis: 38px; border-radius: 10px; }
  .front-body .brand-text strong { font-size: 20px; }
  .front-body .main-nav { width: calc(100vw - 32px); gap: 0; }
  .front-body .main-nav a,
  .front-body .main-nav .city-trigger { min-height: 48px; padding-right: 16px; margin-right: 12px; font-size: 14px; }
  .front-body .main-nav a[href="/download"] { min-height: 36px; margin: 6px 0; padding: 0 15px; }
  .front-body .page-shell { padding-top: 24px; }
  .front-body .directory-page-grid { gap: 18px; }
  .front-body .directory-results-head { padding: 12px 14px; }
  .front-body .city-related { padding: 20px; }
  .front-body .directory-member-photo { border-radius: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .front-body .btn,
  .front-body .directory-member-card { transition: none; }
}

/* Keep directory controls compact and let long account content stay in its card. */
.front-body .directory-filter-form {
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.front-body .directory-filter-field,
.front-body .directory-filter-range { min-width: 0; gap: 6px; padding: 5px 7px; }
.front-body .directory-filter-form select { min-width: 0; padding: 0 20px 0 5px; text-overflow: ellipsis; }
.front-body .directory-filter-range select { width: 0; }
.front-body :is(.directory-filter-range, .search-filter-age) select { appearance: none; -webkit-appearance: none; text-align: center; padding: 0 2px; }
.front-body .directory-filter-range { grid-column: auto; }
.front-body .directory-filter-dash { flex: 0 0 auto; }
.front-body .directory-member-grid { grid-auto-rows: minmax(216px, auto); }
.front-body .directory-member-card { min-height: 216px; padding: 16px; }
.front-body .directory-member-photo { min-height: 180px; max-height: 208px; }
.front-body .directory-member-copy { gap: 9px; }
.front-body :is(.directory-account-copy, .directory-account-name, .directory-service-list a > span:last-child,
  .exchange-record-identity, .exchange-record-detail, .profile-preview-side, .profile-preview-item,
  .profile-detail-card, .profile-detail-facts > div, .profile-form-section label, .search-filter-field) { min-width: 0; }
.front-body :is(.directory-account-name strong, .directory-service-list strong,
  .exchange-record-identity strong, .profile-preview-heading h3, .profile-preview-location,
  .profile-preview-item strong, .profile-detail-facts strong) { overflow-wrap: anywhere; }
.front-body :is(.exchange-wechat-value strong, .exchange-record-detail p,
  .profile-preview-note, .profile-detail-about p, .profile-form-message) { overflow-wrap: anywhere; }
.front-body .profile-page-shell .photo-upload-action { margin-top: 10px; min-height: 48px; }
.front-body .search-filter-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) repeat(3, minmax(120px, 1fr)) auto;
  gap: 8px;
  overflow: visible;
  border-radius: 16px;
}
.front-body :is(.search-filter-age, .search-filter-field) {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbf8f5;
  white-space: nowrap;
}
.front-body .search-filter-form :is(select, .btn) { min-width: 0; min-height: 38px; width: auto; margin: 0; }
.front-body .search-filter-form select { flex: 1 1 0; padding: 0 20px 0 5px; text-overflow: ellipsis; }
.front-body .search-filter-actions { display: flex; gap: 8px; }
.front-body .search-filter-actions .btn { flex: 0 0 auto; padding: 0 14px; white-space: nowrap; }

@media (max-width: 760px) {
  .front-body .directory-filter-form,
  .front-body .search-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .front-body .directory-filter-range { grid-column: auto; }
  .front-body .search-filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .front-body .directory-filter-form { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 8px; padding: 10px; }
  .front-body .search-filter-form { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 8px; padding: 10px; }
  .front-body :is(.directory-filter-field, .directory-filter-range, .search-filter-age, .search-filter-field) { min-height: 46px; padding: 4px 5px; gap: 4px; }
  .front-body :is(.directory-filter-field > span, .directory-filter-label, .search-filter-age > span, .search-filter-field > span) { font-size: 12px; }
  .front-body :is(.directory-filter-form select, .search-filter-form select) { font-size: 13px; padding-right: 15px; padding-left: 2px; }
  .front-body :is(.directory-filter-range, .search-filter-age) select { padding: 0 2px; }
  .front-body .search-filter-actions { grid-column: 1 / -1; }
  .front-body .search-filter-actions .btn { flex: 1 1 0; width: auto; }
}
@media (max-width: 360px) {
  .front-body .main-nav { justify-content: space-between; }
  .front-body .main-nav a,
  .front-body .main-nav .city-trigger { min-width: 0; margin: 0; padding: 0 3px; font-size: 12px; white-space: nowrap; }
  .front-body .main-nav a[href="/download"] { padding: 0 8px; }
}
