@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm-sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../assets/fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --green: #0a5f3f;
  --green-600: #084d33;
  --green-50: #f0f7f4;
  --btn-bg: #0a5f3f;
  --forest: #003912;
  --carbon: #222325;
  --slate: #404145;
  --graphite: #62646a;
  --smoke: #74767e;
  --fog: #c5c6c9;
  --mist: #eeeeee;
  --paper: #ffffff;
  --ink: #000000;
  --page: #f7f7f8;
  --page-x: 20px;
  --wrap: 100%;
  --nav-h: 64px;
  --tab-h: 56px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --line: #e4e5e7;
  --hair: #eeeeee;
  --shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 28px rgba(10, 95, 63, 0.10);
  --font: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --danger: #c62828;
  --gold: #ffb33e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--page); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .gig:hover, .hosp-card:hover { transform: none; }
}
html { scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--page) !important;
  color: var(--carbon);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  padding-bottom: calc(var(--tab-h) + var(--safe-b));
  touch-action: manipulation;
}
a { color: inherit; text-decoration: none; }
a, button { -webkit-tap-highlight-color: rgb(10 95 63 / 0.12); }
a:hover { color: var(--green); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -40px; z-index: 80;
  background: var(--carbon); color: var(--paper); padding: 8px 10px; border-radius: var(--radius-sm);
}
.skip:focus { top: 8px; }
.wrap {
  box-sizing: border-box;
  width: var(--wrap);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-x);
  padding-right: var(--page-x);
}

.wordmark { font-size: 28px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.wordmark i { color: var(--green); font-style: normal; }
.wordmark:hover { color: var(--carbon); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border: 0; border-radius: var(--radius-sm);
  background: var(--carbon); color: var(--paper); font-weight: 700; font-size: 16px;
  cursor: pointer; white-space: nowrap;
}
.btn:hover { color: var(--paper); background: #111; }
.btn:active { transform: translateY(1px); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-600); color: #fff; }
.btn-ghost {
  background: #fff; color: var(--carbon); border: 1px solid var(--line);
}
.btn-ghost:hover { color: var(--green); border-color: var(--green); background: #fff; }
.fav-btn.is-on { color: var(--green); border-color: var(--green); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.icon-btn {
  width: 40px; height: 40px; border: 0; background: none; color: var(--carbon);
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn i { font-size: 22px; }
.icon-btn:hover { color: var(--carbon); }

.nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: #ffffff; border-bottom: 1px solid var(--hair);
}
.nav.is-compact { border-bottom-color: transparent; box-shadow: var(--shadow); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 8px; }
.nav-inner .wordmark { margin-right: 8px; flex: none; }
.nav-search {
  display: flex; flex: 1; min-width: 0; max-width: none; height: 36px;
  background: #f4f6f5; border: 1px solid transparent; border-radius: 8px; overflow: hidden;
}
.nav-search input {
  border: 0; width: 100%; min-width: 0; padding: 0 10px; background: transparent;
  color: var(--carbon); font-size: 14px;
}
.nav-search input::placeholder { color: var(--smoke); }
.nav-search:focus-within {
  background: #fff;
  border-color: var(--green);
}
.nav-search button {
  width: 44px; height: 36px; border: 0; background: var(--carbon); color: var(--paper);
  display: grid; place-items: center; flex: none; cursor: pointer;
}
.nav-search button:hover { color: var(--paper); }
.nav-search button i { font-size: 18px; }

/* Search-suggest dropdown anchored under the search form. The form is
   position:relative so the absolute panel sits just below the input. */
.nav-search { position: relative; }
.search-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: auto;
  width: min(640px, 92vw); max-height: min(70vh, 520px); overflow: auto;
  background: #fff; border: 1px solid var(--mist);
  border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  padding: 6px 0; z-index: 80;
}
.search-suggest[hidden] { display: none; }
.sg-group + .sg-group { border-top: 1px solid var(--mist); margin-top: 4px; padding-top: 4px; }
.sg-group-head {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px 4px; color: var(--graphite);
  font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
}
.sg-group-head i { font-size: 14px; color: var(--green); }
.sg-count {
  margin-left: auto; font-weight: 600; color: var(--smoke); font-size: 11px;
  background: var(--green-50); padding: 1px 8px; border-radius: 999px;
}
.sg-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 16px; text-decoration: none; color: var(--carbon);
  border-left: 3px solid transparent;
  transition: background 120ms ease, border-color 120ms ease;
}
.sg-item:hover, .sg-item:focus-visible {
  background: var(--green-50); border-left-color: var(--green); outline: none;
}
.sg-thumb {
  width: 44px; height: 44px; flex: none; border-radius: 10px;
  background: var(--mist); overflow: hidden; display: grid; place-items: center;
  color: var(--smoke); font-size: 22px;
}
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sg-thumb-all { background: var(--green-50); color: var(--green); }
.sg-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sg-title {
  font-size: 14px; font-weight: 600; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sg-title mark { background: #fff3a3; color: var(--carbon); padding: 0 1px; border-radius: 3px; }
.sg-meta {
  font-size: 12px; color: var(--graphite); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sg-tag {
  flex: none; align-self: stretch; display: inline-flex; align-items: center;
  padding: 4px 9px; border-radius: 999px;
  background: #f3f7f5; color: var(--slate);
  font-size: 11px; font-weight: 600; letter-spacing: 0;
}
.sg-item:hover .sg-tag { background: #fff; }
.sg-arrow { color: var(--green); font-size: 18px; }
.sg-item-all { border-top: 1px dashed var(--mist); margin-top: 4px; }
.sg-item-all .sg-title { font-weight: 700; color: var(--green); }
@media (max-width: 600px) {
  .search-suggest { width: calc(100vw - 24px); }
}
.nav-tools { display: none; }
.nav-tools a, .nav-tools button {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0;
  color: var(--carbon); font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
}
.nav-tools a:hover, .nav-tools button:hover { color: var(--green); }
.nav-tools a.is-on { color: var(--green); }
.nav-tools i { font-size: 16px; }
.nav-tools .caret { font-size: 12px; color: var(--graphite); }
.nav-join { font-weight: 700; }
.nav-tools a.nav-join { color: var(--green); }
.nav-tools a.nav-join:hover { color: var(--green-600); }
.nav-tools a.btn.nav-login {
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--carbon); color: var(--paper); font-size: 14px;
}
.nav-tools a.btn.nav-login:hover { color: var(--paper); background: #111; }
.nav .btn { border-radius: var(--radius-sm); height: 36px; padding: 0 14px; font-size: 14px; }
header.nav .icon-btn.nav-menu { display: none !important; margin-left: auto; }
.nav-cat { display: none; }

/* 服务分类横条：移动端收起，桌面横排 */
.catbar { display: none; }

.page-head {
  display: grid; grid-template-columns: 56px 1fr 56px; align-items: center;
  height: 56px; background: #fff; border-bottom: 1px solid var(--hair);
}
.page-back { display: grid; place-items: center; height: 56px; color: var(--carbon); }
.page-back i { font-size: 22px; }
.page-back:hover { color: var(--carbon); }
.page-head h1, .page-head-title {
  margin: 0; text-align: center; font-size: 16px; font-weight: 700;
  color: #1a1a1a; letter-spacing: -0.02em;
}

.crumb {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 20px 0 0; color: var(--graphite); font-size: 13px;
}
.crumb a:hover { color: var(--green); }
.crumb .sep { color: var(--fog); }

.trust-bar {
  display: flex; flex-wrap: nowrap; gap: 0; overflow-x: auto;
  padding: 0; margin: 8px 0 24px;
  background: #fff; border: 1px solid var(--hair); border-radius: var(--radius-md);
  box-shadow: var(--shadow); scrollbar-width: none;
}
.trust-bar::-webkit-scrollbar { display: none; }
.trust-bar .item {
  flex: none; display: flex; align-items: center; gap: 12px;
  background: none; border: 0; border-right: 1px solid var(--hair);
  padding: 14px 18px; white-space: nowrap;
}
.trust-bar .item:last-child { border-right: 0; }
.trust-bar .item i {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px; background: var(--green-50); color: var(--green); font-size: 18px;
}
.trust-bar strong { display: block; font-size: 13px; color: var(--carbon); font-weight: 700; }
.trust-bar span { display: block; margin-top: 2px; font-size: 12px; color: var(--graphite); }

.gigs, .h-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
.gig {
  display: flex; flex-direction: column; overflow: hidden; width: 100%; min-width: 0;
  background: #fff; border-radius: 0;
  box-shadow: none; color: var(--carbon);
  position: relative;
}
.gig:hover { color: inherit; transform: none; box-shadow: none; }
.gig-link { display: flex; flex-direction: column; flex: 1; min-width: 0; color: inherit; }
.gig-link:hover { color: inherit; }
.gig-media { position: relative; width: 100%; aspect-ratio: 1 / 1 !important; overflow: hidden; flex: none; background: #ececec; border-radius: 10px; }
.gig-img, .gig-media img {
  position: absolute !important; inset: 0 !important;
  width: 100% !important; height: 100% !important; aspect-ratio: auto !important;
  object-fit: cover !important; object-position: center; display: block; max-width: none; border-radius: 0;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.gig:hover .gig-img, .gig:hover .gig-media img { transform: scale(1.06); }
.gig-cat, .hosp-cat { display: none !important; }
.gig-off {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  height: 20px; padding: 0 6px;
  display: inline-flex; align-items: center;
  background: #e53935; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1; border-radius: 2px;
}
.gig-heart, .hosp-heart {
  position: absolute; right: 8px; top: 8px; z-index: 3;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / 0.92); color: var(--carbon);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 1px 3px rgb(34 35 37 / 0.12);
}
.gig-heart:hover, .hosp-heart:hover { color: var(--green); }
.gig-heart.is-on, .hosp-heart.is-on { color: var(--green); }
.gig-heart i, .hosp-heart i { font-size: 18px; }
.gig-body { display: flex; flex-direction: column; gap: 0; padding: 10px 2px 4px; background: transparent; flex: 1; min-width: 0; }
.gig-seller-row { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; min-width: 0; }
.gig-avatar {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--green); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0;
}
.gig-avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.gig-seller {
  margin: 0 0 6px; font-size: 12px; font-weight: 400; color: #888;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 8px;
}
.gig-grade { font-size: 12px; font-weight: 400; color: #999; }
.grade-mark {
  display: inline-flex; align-items: center; justify-content: center;
  height: 20px; padding: 0 8px; flex: none;
  background: #0a5f3f; color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  line-height: 1; border-radius: 3px; white-space: nowrap;
}
.gig-title {
  margin: 0; font-size: 14px; font-weight: 600; line-height: 1.35; color: #1a1a1a;
  letter-spacing: -0.02em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}
.gig:hover .gig-title { color: #1a1a1a; }
.gig:hover .gig-now { color: #0a5f3f !important; }
.gig:hover .gig-old { color: #b5b6ba; }
.gig:hover .gig-seller { color: #888; }
.gig:hover .gig-grade { color: #999; }
.gig-foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-top: 8px; min-width: 0; width: 100%;
}
.gig-rating { margin: 0; font-size: 12px; color: #1a1a1a; display: flex; align-items: center; gap: 4px; flex: none; }
.gig-stars { color: var(--gold); line-height: 1; flex: none; font-size: 12px; }
.gig-score { font-weight: 700; color: #1a1a1a; }
.gig-count { color: #888; white-space: nowrap; }
.gig-price {
  margin: 0; padding: 0; display: flex; justify-content: flex-end;
  align-items: baseline; gap: 4px; min-width: 0; flex: 1 1 auto;
  font-variant-numeric: tabular-nums;
}
.gig-from { font-size: 11px; font-weight: 600; letter-spacing: 0; color: #999; text-transform: none; }
.gig-old { color: #b5b6ba; font-size: 12px; text-decoration: line-through; }
.gig-now {
  color: #0a5f3f !important;
  font-size: 22px !important;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: none !important;
}
.gig-save {
  display: none;
}

.hosp-card {
  display: flex; flex-direction: column; overflow: hidden; position: relative;
  background: #fff; border-radius: 0; padding: 0;
  box-shadow: none; color: var(--carbon);
}
.hosp-card:hover { color: inherit; transform: none; box-shadow: none; }
.hosp-link { display: flex; flex-direction: column; flex: 1; color: inherit; min-width: 0; }
.hosp-link:hover { color: inherit; }
.hosp-cover { position: relative; aspect-ratio: 1 / 1 !important; overflow: hidden; background: #ececec; border-radius: 10px; }
.hosp-cover img {
  position: absolute !important; inset: 0 !important;
  width: 100% !important; height: 100% !important; aspect-ratio: auto !important;
  object-fit: cover; border-radius: 0; background: #ececec;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}
.hosp-card:hover .hosp-cover img { transform: scale(1.06); }
.hosp-body { padding: 10px 2px 4px; }
.hosp-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.hosp-card h3.gig-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.025em; color: #1a1a1a; }
.hosp-card:hover h3 { color: #1a1a1a; }
.hosp-card .meta { margin: 0; font-size: 13px; color: var(--graphite); }
.hosp-addr { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 6px !important; }
.hosp-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 999px; background: var(--green-50); color: var(--green); font-size: 12px; font-weight: 600;
}
.tag.muted { background: var(--mist); color: var(--slate); }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--slate); }
.form-group .req { color: var(--danger); }
.form-input, .form-select, .form-area {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 15px; color: var(--carbon); background: var(--paper);
}
.form-area { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.form-input:focus, .form-select:focus, .form-area:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(10 95 63 / 0.14);
}
.form-input:focus-visible, .form-select:focus-visible, .form-area:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}
.form-input::placeholder, .form-area::placeholder { color: var(--smoke); }
.field-err { display: none; margin-top: 6px; font-size: 13px; color: var(--danger); }
.form-group.is-bad .form-input, .form-group.is-bad .form-select, .form-group.is-bad .form-area { border-color: var(--danger); }
.form-group.is-bad .field-err { display: block; }
.form-hint { margin: 6px 0 0; font-size: 13px; color: var(--graphite); }
.alert {
  display: none; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px;
}
.alert.show { display: block; }
.alert-ok { background: var(--green-50); color: var(--green-600); }
.alert-bad { background: #fdecea; color: var(--danger); }

.empty {
  text-align: center; padding: 48px 16px; color: var(--graphite);
}
.empty i { font-size: 36px; color: var(--green); }
.empty p { margin: 8px 0 16px; }

footer { margin-top: 56px; padding: 40px 0 24px; background: var(--paper); border-top: 1px solid var(--mist); }
.foot-grid { display: grid; grid-template-columns: 1fr; }
footer h3 { margin: 20px 0 8px; font-size: 16px; font-weight: 600; color: var(--carbon); }
.foot-grid > div:first-child h3 { margin-top: 0; }
footer a, footer p {
  display: block; width: 100%; text-align: left; padding: 6px 0; color: #62646a; font-size: 15px;
}
footer a:hover { color: var(--green); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  border-top: 1px solid var(--hair); padding-top: 20px; margin-top: 28px;
}
footer .foot-bottom .wordmark { width: auto; padding: 0; color: var(--carbon); }
.legal { margin: 0; width: auto; padding: 0; color: var(--smoke); font-size: 12px; line-height: 1.5; text-align: right; }

/* 移动端 footer 与首页一致：平衡的两行三列网格 + 紧凑间距 */
@media (max-width: 767px) {
  footer { margin-top: 20px; padding: 0 0 20px; }
  .foot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    gap: 16px 10px;
    padding: 24px 16px;
  }
  .foot-grid > div:nth-child(1) { grid-column: 1; grid-row: 1 / span 2; }
  .foot-grid > div:nth-child(2) { grid-column: 2; grid-row: 1; }
  .foot-grid > div:nth-child(3) { grid-column: 3; grid-row: 1; }
  .foot-grid > div:nth-child(4) { grid-column: 3; grid-row: 2; }
  .foot-grid > div:nth-child(5) { grid-column: 2; grid-row: 2; }
  .foot-grid > div h3 { font-size: 13px; font-weight: 600; margin: 0 0 10px; color: #1a1a1a; }
  .foot-grid > div a { font-size: 12px; line-height: 2; color: #666; display: block; padding: 0; width: auto; }
  .foot-bottom { padding: 16px; font-size: 12px; margin-top: 0; border-top: 1px solid var(--mist); }
}

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: #fff; border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 11px; color: var(--graphite);
}
.tabs a.is-on, .tabs a.is-on i, .tabs a:hover { color: var(--green); }
.tabs i { font-size: 22px; }

.sheet { position: fixed; inset: 0; z-index: 70; display: none; }
.sheet.show { display: block; }
.sheet-back { position: absolute; inset: 0; background: rgb(34 35 37 / 0.45); }
.sheet-card {
  position: absolute; left: 0; right: 0; bottom: 0; background: var(--paper);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 16px 16px calc(20px + var(--safe-b)); max-height: 80dvh; overflow: auto;
  overscroll-behavior: contain;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sheet-card h2 { font-size: 18px; margin: 0; font-weight: 600; }
.sheet-close { border: 0; background: none; color: var(--graphite); font-size: 14px; cursor: pointer; padding: 8px 0; }
.sheet-card a, .sheet-card button.opt {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--mist); padding: 14px 0; cursor: pointer; font-size: 16px;
}
.sheet-card a:hover, .sheet-card button.opt:hover { color: var(--green); }

.toast {
  position: fixed; left: 50%; bottom: calc(72px + var(--safe-b)); transform: translateX(-50%);
  z-index: 90; background: var(--carbon); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 0.2s;
  white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
.toast.show { opacity: 1; }

@media (min-width: 768px) {
  :root { --page-x: 32px; }
  .nav-inner .wordmark { margin-right: 16px; }
  .nav-search { max-width: 320px; height: 42px; }
  .nav-search input { padding: 0 14px; font-size: 15px; }
  .nav-search button { width: 48px; height: 42px; }
  .gigs, .h-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 10px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 8px 40px; }
  .sheet-card { left: 50%; right: auto; width: min(480px, 100%); transform: translateX(-50%); }
}

@media (max-width: 1023px) {
  .nav-tools { display: none !important; }
  header.nav { height: auto; }
  .nav-inner { flex-wrap: wrap; row-gap: 10px; column-gap: 8px; padding-block: 10px; }
  header.nav .icon-btn.nav-menu { display: grid !important; order: 1; margin: 0; }
  .nav-inner .wordmark { order: 2; flex: 1; text-align: center; margin: 0; }
  header.nav .nav-login-m { display: inline-flex; order: 3; margin: 0; min-width: 44px; justify-content: flex-end; }
  .nav-search { order: 4; flex-basis: 100%; width: 100%; max-width: none; height: 44px; }
  .nav-search button { width: 48px; height: 44px; }
  .gig-from, .gig-old { display: none !important; }
  .gig-now { font-size: 18px !important; }
}

@media (min-width: 1024px) {
  :root { --wrap: 1200px; --page-x: 32px; }
  .wrap {
    width: 1200px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 32px;
    padding-right: 32px;
  }
  header.nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1200px) minmax(0, 1fr);
  }
  header.nav .nav-inner {
    grid-column: 2;
    width: 100%;
    max-width: none;
    flex: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 32px;
    padding-right: 32px;
  }
  body { padding-bottom: 0; }
  .nav-search { flex: 1; max-width: 560px; }
  .nav-tools { display: flex !important; align-items: center; gap: 22px; margin-left: auto; }
  header.nav .icon-btn.nav-menu { display: none !important; }
  .nav-cat { display: none; }
  .nav .btn, .nav-tools a.btn.nav-login { height: 40px; border-radius: var(--radius-sm); }
  .tabs { display: none; }
  .page-head { display: none; }
  .gigs, .h-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px; }
  .foot-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0 40px; }
  footer h3 { margin-top: 0; }
  footer a, footer p { font-size: 14px; padding: 5px 0; }
  .toast { bottom: 32px; }
  .trust-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
  }
  .trust-bar .item { min-width: 0; }

  .catbar {
    display: block;
    position: sticky;
    top: var(--nav-h);
    z-index: 39;
    background: #fff;
    border-bottom: 1px solid var(--hair);
  }
  /* L1 单行横拉：分类很多（55）放不下一行，让其左右滑动。
     桌面端用 scroll-snap 让点击 L1 后 L2 行的滚入更顺。 */
  .catbar-in {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding-top: 10px;
    padding-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .catbar-in::-webkit-scrollbar { display: none; }
  /* L2 单行横拉：点击 L1 后才出现，children 多时可左右滑。 */
  .catbar-sub {
    border-top: 1px solid var(--hair);
    background: #fff;
    padding: 6px 0 10px;
  }
  .catbar-sub[hidden] { display: none; }
  .catbar-sub .sub-shelf {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .catbar-sub .sub-shelf::-webkit-scrollbar { display: none; }
  .catbar-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 32px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate);
    white-space: nowrap;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
  }
  .catbar-link:hover,
  .catbar-link:focus-visible {
    color: var(--green);
    background: var(--green-50);
  }
  .catbar-link.is-on {
    color: #fff;
    background: var(--green);
    border-color: var(--green);
  }
  /* L2 chip 与 list.html 的 sub-shelf-chip 同款视觉，绿色主题 */
  .catbar-sub .sub-shelf-chip {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--hair);
    background: var(--page);
    color: var(--slate);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
  }
  .catbar-sub .sub-shelf-chip:hover {
    color: var(--green);
    border-color: var(--green);
    background: var(--green-50);
  }
  .catbar-sub .sub-shelf-all {
    background: var(--green-50);
    color: var(--green);
    border-color: var(--green);
    font-weight: 600;
  }
}

@media (min-width: 1440px) {
  /* 1440+ 仍然单行，靠 L2 子行滚动条，无需额外规则 */
}

@media (max-width: 599px) {
  .line { grid-template-columns: 72px 1fr; }
  .line img { width: 72px; height: 54px; }
  .line .order-pay { grid-column: 1 / -1; text-align: right; }
  .store-box { flex-wrap: wrap; }
  .store-box .btn { width: 100%; }
}

@media (max-width: 767px) {
  .gig-body { padding: 8px 6px 8px; }
  .gig-foot { flex-wrap: wrap; gap: 4px 6px; }
  .gig-from, .gig-old { display: none !important; }
  .gig-now { font-size: 16px !important; }
  .foot-grid {
    display: grid !important; grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px 24px !important; padding: 24px 16px !important;
  }
  .foot-grid > div h3 { font-size: 13px !important; font-weight: 600 !important; margin: 0 0 10px !important; color: #1a1a1a !important; }
  .foot-grid > div a { font-size: 12px !important; line-height: 2 !important; color: #666 !important; display: block !important; padding: 0 !important; width: auto !important; }
  footer { margin-top: 20px; padding: 0 0 20px; }
  .foot-bottom {
    padding: 16px !important; font-size: 12px !important; margin-top: 0;
    border-top: 1px solid #e5e7eb; flex-direction: column; align-items: flex-start; gap: 6px;
  }
  footer .legal { text-align: left; font-size: 12px !important; }
}
@media (max-width: 1023px) {
  input:not([type="checkbox"]):not([type="radio"]),
  select, textarea {
    font-size: 16px !important;
  }
}
@media (max-width: 767px) {
  html, body { overflow-x: clip; max-width: 100%; }
  :root { --page-x: 16px; --nav-h: 56px; }
  .wordmark { font-size: 22px; }
  .nav { height: var(--nav-h); }
  .nav-inner { gap: 6px; }
  .nav-search { height: 44px; }
  .nav-search button { width: 48px; height: 44px; min-width: 48px; min-height: 44px; }
  .icon-btn, .page-back {
    min-width: 44px; min-height: 44px; width: 44px; height: 44px;
  }
  .tabs a {
    min-height: 44px;
  }
  .page-head { height: 48px; }
  .btn, .btn-green, .btn-ghost { min-height: 44px; }
  .crumb { padding-top: 8px !important; }
}

/* 购物车入口与角标 */
.nav-tools .nav-cart { position: relative; display: inline-flex; align-items: center; color: var(--carbon); }
.nav-tools .nav-cart i { font-size: 20px; }
.nav-tools .nav-cart:hover { color: var(--green); }
header.nav .icon-btn.nav-cart-m { display: none !important; position: relative; }
.nav-login-m { display: none; align-items: center; height: 40px; color: var(--carbon); font-size: 15px; font-weight: 400; white-space: nowrap; }
.nav-login-m:hover { color: var(--green); }
.cart-badge {
  position: absolute; top: -6px; right: -8px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 10px; line-height: 16px; text-align: center; font-weight: 700;
  display: none;
}
.cart-badge.show { display: inline-block; }
header.nav .icon-btn.nav-cart-m .cart-badge { top: 2px; right: 2px; }
@media (max-width: 1023px) { header.nav .icon-btn.nav-cart-m { display: none !important; } }
@media (min-width: 1024px) { header.nav .icon-btn.nav-cart-m { display: none !important; } }
