:root {
  --bg: #f4f1ea;
  --card: #ffffff;
  --text: #1c2b23;
  --sub: #6b7a70;
  --muted: #9aa69d;
  --line: #ede9e0;
  --green: #1e5b3f;
  --green-deep: #123c2b;
  --green-soft: #e9f1eb;
  --gold: #b3813c;
  --gold-soft: #f3e9d8;
  --nav-h: 46px;
}

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

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: #e9e6df;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
}

.phone {
  position: relative;
  max-width: 430px;
  min-height: 100%;
  margin: 0 auto;
  background: var(--bg);
}

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #f1ede4;
}

.nav-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.nav-back {
  position: absolute;
  left: 4px;
  bottom: 0;
  height: var(--nav-h);
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-back svg {
  width: 22px;
  height: 22px;
}

.page {
  padding: 12px 12px calc(24px + env(safe-area-inset-bottom));
}

.hidden {
  display: none !important;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 20px 18px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green) 58%, #2c7050 100%);
}

.hero::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -34px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 68%);
}

.hero-mark {
  position: absolute;
  right: -8px;
  bottom: -30px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 112px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero-eyebrow {
  position: relative;
  font-size: 11px;
  letter-spacing: 2.5px;
  color: #d8c08b;
}

.hero-title {
  position: relative;
  margin-top: 6px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

.hero-sub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
}

.hero-sub b {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 1px;
  font-variant-numeric: tabular-nums;
}

.hero-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* Search */
.toolbar {
  position: sticky;
  top: calc(var(--nav-h) + env(safe-area-inset-top));
  z-index: 15;
  margin: 0 -12px;
  padding: 10px 12px 8px;
  background: var(--bg);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.search-box:focus-within {
  border-color: #cfe0d5;
}

.search-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--muted);
}

.search {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: none;
  font-size: 14px;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}

.search::placeholder {
  color: #b3bcb5;
}

.search::-webkit-search-cancel-button,
.search::-webkit-search-decoration {
  display: none;
}

.search-clear {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #f0f2ee;
  color: var(--sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-clear svg {
  width: 14px;
  height: 14px;
}

.meta {
  margin: 2px 2px 8px;
  color: var(--muted);
  font-size: 12px;
}

.meta b {
  color: var(--green);
  font-weight: 600;
}

/* List */
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 12px 13px 14px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 1px 2px rgba(28, 43, 35, 0.04);
}

.list-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.list-item:active {
  background: #fcfbf7;
}

.avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Songti SC", "STSong", serif;
  font-size: 21px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(160deg, #2f7351 0%, var(--green-deep) 100%);
}

.list-body {
  flex: 1;
  min-width: 0;
}

.list-name {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-company {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--sub);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-addr {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
}

.list-addr svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.list-addr span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-nav {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #d9e6dc;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.list-nav svg {
  width: 12px;
  height: 12px;
}

.list-nav:active {
  background: #dceade;
}

/* Detail */
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 20px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green) 60%, #2c7050 100%);
}

.detail-hero::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0) 68%);
}

.detail-eyebrow {
  position: relative;
  font-size: 11px;
  letter-spacing: 2px;
  color: #d8c08b;
}

.detail-name {
  position: relative;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.5px;
}

.detail-company {
  position: relative;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn svg {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(30, 91, 63, 0.2);
}

.btn-primary:active {
  background: #174a33;
}

.btn-ghost {
  background: #fff;
  color: var(--green);
  border-color: #dbe7de;
}

.btn-ghost:active {
  background: #f6faf7;
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 4px 16px;
  margin-bottom: 12px;
}

.card-title {
  padding: 14px 0 2px;
  font-size: 15px;
  font-weight: 700;
}

.rows {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

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

.row-label {
  width: 78px;
  flex-shrink: 0;
  padding-top: 1px;
  color: var(--muted);
  font-size: 13px;
}

.row-value {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

.row-value a {
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

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

.copy {
  flex-shrink: 0;
  margin-top: 1px;
  padding: 2px 9px;
  border: 0;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  line-height: 18px;
  cursor: pointer;
}

.copy:active {
  background: #dceade;
}

.phone-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.2px;
}

.note {
  padding: 2px 4px 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 16px;
  color: var(--muted);
  font-size: 13px;
}

.status-error {
  flex-direction: column;
  gap: 14px;
}

.status-error p {
  color: var(--sub);
  font-size: 14px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #d9e3dc;
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 18px;
  text-decoration: none;
  border: 1px solid #d9e6dc;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.retry:active {
  background: #dceade;
}

.empty {
  padding: 56px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.empty svg {
  display: block;
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  color: #c3ccc5;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(36px + env(safe-area-inset-bottom));
  z-index: 60;
  max-width: 300px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(24, 34, 28, 0.88);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 480px) {
  body {
    padding: 16px 0;
  }

  .phone {
    min-height: calc(100vh - 32px);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);
  }

  .nav {
    border-radius: 18px 18px 0 0;
  }
}
