:root {
  color-scheme: light;
  --text: #161616;
  --muted: #8a8a8a;
  --line: #f0f0f0;
  --soft: #f6f6f6;
  --open: #0d8a43;
  --open-bg: #e8f6ee;
  --closed: #8d8d8d;
  --closed-bg: #f3f3f3;
  --coral: #f25c3d;
  --violet: #7c5cfc;
  --teal: #129e8d;
  --blue: #3d7eff;
  --gold: #e09400;
  --rose: #e8548a;
  --green: #1ea36a;
  --shadow: 0 8px 22px rgba(22, 22, 22, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  margin-top: 0 !important;
}

body {
  margin: 0;
  background: #e9e9e9;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #161616;
  outline-offset: 2px;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  border: 0;
}

.app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: #fff;
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  height: calc(48px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.topbar-title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-title.is-home {
  text-align: center;
  padding: 0 12px;
}

.topbar-side,
.icon-btn {
  width: 40px;
  height: 40px;
  flex: none;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.anmo-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex: none;
}

.icon-badge .anmo-icon {
  width: 14px;
  height: 14px;
}

.icon-badge.is-coral { background: #fff0eb; color: var(--coral); }
.icon-badge.is-violet { background: #f3efff; color: var(--violet); }
.icon-badge.is-teal { background: #e7f7f4; color: var(--teal); }
.icon-badge.is-blue { background: #eaf1ff; color: var(--blue); }
.icon-badge.is-gold { background: #fff6e6; color: var(--gold); }
.icon-badge.is-rose { background: #fff0f5; color: var(--rose); }
.icon-badge.is-green { background: #e8f8f0; color: var(--green); }

.main {
  min-height: calc(100vh - 48px);
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.page-lead {
  margin: 8px 16px 12px;
  font-size: 13px;
  color: var(--muted);
}

.home-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 0;
}

.home-tools h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.text-btn .anmo-icon {
  width: 16px;
  height: 16px;
}

.region-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 2px;
  scrollbar-width: none;
}

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

.region-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.region-chip .anmo-icon {
  width: 14px;
  height: 14px;
  color: var(--teal);
}

.region-chip b {
  color: var(--coral);
  font-size: 12px;
  font-weight: 600;
}

.region-chip:active {
  background: #ececec;
}

.region-panel {
  padding-top: 4px;
}

.region-panel[hidden] {
  display: none;
}

.region-wrap {
  padding-bottom: 4px;
}

.region-group {
  margin: 0 16px 14px;
}

.region-label {
  margin: 0 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

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

.region-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 4px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

.region-cell:active {
  background: #ececec;
}

.region-cell.is-empty {
  color: #c4c4c4;
  font-weight: 500;
}

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 16px 8px;
}

.tech-grid.is-home {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 12px 8px;
}

.tech-grid.is-home .tech-card {
  border-radius: 10px;
}

.tech-grid.is-home .tech-name {
  margin: 6px 6px 0;
  font-size: 12px;
}

.tech-grid.is-home .tech-sub {
  display: block;
  margin: 2px 6px 0;
  font-size: 10px;
  line-height: 1.35;
  white-space: normal;
}

.tech-grid.is-home .tech-sub .is-region,
.tech-grid.is-home .tech-sub .is-price {
  display: flex;
}

.tech-grid.is-home .tech-sub .anmo-icon {
  width: 10px;
  height: 10px;
}

.tech-grid.is-home .tech-status {
  margin: 2px 6px 0;
  font-size: 10px;
}

.tech-grid.is-home .tech-views {
  margin: 1px 6px 8px;
  font-size: 10px;
}

.load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  height: 42px;
  margin: 4px 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.load-more:disabled {
  color: var(--muted);
}

.tech-card {
  display: block;
  min-width: 0;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
}

.tech-card:active {
  transform: scale(0.985);
}

.tech-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  background: var(--soft);
  color: #c4c4c4;
  overflow: hidden;
}

.tech-photo img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.tech-photo .anmo-icon {
  width: 36px;
  height: 36px;
}

.tech-name {
  display: -webkit-box;
  margin: 8px 10px 0;
  min-height: 1.35em;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tech-sub {
  display: flex;
  gap: 8px;
  margin: 2px 10px 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.tech-sub .is-region,
.tech-sub .is-price {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.tech-sub .anmo-icon {
  width: 12px;
  height: 12px;
  flex: none;
}

.tech-sub .is-region {
  color: var(--teal);
}

.tech-sub .is-price {
  color: var(--coral);
  font-weight: 600;
}

.tech-status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 4px 10px 12px;
  font-size: 12px;
}

.tech-status.is-open,
.pill.is-open {
  color: var(--open);
}

.tech-status.is-closed,
.pill.is-closed {
  color: var(--closed);
}

.tech-views,
.profile-views {
  color: var(--muted);
  font-size: 12px;
}

.tech-views {
  display: block;
  margin: 0 10px 12px;
}

.profile-views {
  margin: 8px 0 0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

.carousel {
  position: relative;
  overflow: hidden;
  background: var(--soft);
}

.carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.4s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  width: 100%;
}

.carousel-slide img,
.carousel-empty {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
  background: #f3f3f3;
}

.carousel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #b5b5b5;
}

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

.carousel-empty .anmo-icon {
  width: 40px;
  height: 40px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn.is-prev { left: 10px; }
.carousel-btn.is-next { right: 10px; }

.carousel-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
}

.profile-hero {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px 0;
}

.profile-photo {
  width: 126px;
  height: 168px;
  flex: none;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #ffe8df, #efe7ff);
  color: #b9a0e6;
}

.profile-photo img,
.profile-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-fallback .anmo-icon {
  width: 36px;
  height: 36px;
}

.profile-main {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.profile-name {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
}

.photo-film {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px 0;
  scrollbar-width: none;
}

.photo-film::-webkit-scrollbar {
  display: none;
}

.photo-film button {
  width: 52px;
  height: 68px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  background: var(--soft);
  flex: none;
}

.photo-film button.is-on {
  border-color: var(--coral);
}

.photo-film img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  display: block;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 26px;
  margin-top: 8px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill.is-open { background: var(--open-bg); }
.pill.is-closed { background: var(--closed-bg); }

.profile-region {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.profile-price {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 12px 0 0;
  white-space: nowrap;
}

.profile-price span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.profile-price strong {
  color: var(--coral);
  font-size: 22px;
  font-weight: 700;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  margin-top: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
}

.btn-share .anmo-icon {
  width: 15px;
  height: 15px;
}

.single-technician .main {
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}

.contact-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  width: 100%;
  max-width: 480px;
  transform: translateX(-50%);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 36%);
}

.btn-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  border-radius: 14px;
  background: var(--coral);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.btn-contact .anmo-icon {
  width: 18px;
  height: 18px;
  flex: none;
  overflow: visible;
}

.block {
  margin: 12px 16px 0;
  padding: 14px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.block h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.block p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  word-break: break-word;
}

.muted {
  color: var(--muted);
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.specs div {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--soft);
}

.specs dt {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.specs dd {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.address-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.address-text {
  flex: 1;
  word-break: break-all;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #e7f7f4;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
}

.btn-copy .anmo-icon {
  width: 16px;
  height: 16px;
}

#anmo-map {
  height: 210px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--soft);
}

#anmo-map.is-fallback {
  height: auto;
  min-height: 72px;
}

.map-fallback,
.map-note {
  margin: 0;
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.map-note {
  padding: 0;
  text-align: left;
}

.coords[hidden],
.btn-nav[hidden] {
  display: none !important;
}

.coords {
  margin-top: 10px !important;
  color: #6b6b6b;
  font-size: 13px;
}

.btn-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 46px;
  margin-top: 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, #ff7a45, #f25c6e);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(242, 92, 61, 0.28);
}

.btn-nav .anmo-icon {
  width: 18px;
  height: 18px;
}

.empty {
  padding: 72px 24px;
  text-align: center;
  color: var(--muted);
}

.empty p {
  margin: 0;
}

.empty .btn-nav {
  display: inline-flex;
  width: auto;
  padding: 0 18px;
}

.pad {
  padding: 16px;
}

.prose h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.prose p {
  margin: 0 0 12px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  max-width: calc(100% - 48px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #161616;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 481px) {
  .app {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track,
  .toast,
  .tech-card {
    transition: none;
  }
}
