/* ============================================================
   网页版布局：桌面侧边导航 + 移动端底部导航
   在 styles.css 的小程序视觉语言之上做响应式扩展
   ============================================================ */

html, body { height: 100%; }
body {
  background: var(--foam);
  overflow: hidden;
}
#root { height: 100dvh; }

.mp-root {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--foam);
}
.mp-main {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.mp-content { flex: 1; }
.mp-header { display: none !important; }
.web-side { display: none; }
.query-hint { padding: 0 14px 18px; }

/* ---------------- 顶栏 ---------------- */
.app-top {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
  z-index: 9;
}
.at-back {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--foam);
  color: var(--navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.at-back:hover { background: #e6eff5; }
.at-brand {
  width: 32px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}
.at-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.at-title b {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.at-title span {
  display: none;
  font-family: var(--latin);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.at-help {
  height: 36px;
  padding: 0 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy-700);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  flex-shrink: 0;
}
.at-help:hover { border-color: var(--accent); color: var(--accent-deep); }
.at-help span { display: none; }

.mp-tabbar { flex-shrink: 0; }

/* ---------------- 桌面 ---------------- */
@media (min-width: 900px) {
  .mp-root {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
  }
  .mp-tabbar { display: none; }

  .web-side {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow-y: auto;
    padding: 24px 18px 18px;
    background-color: var(--navy-800);
    background-image:
      radial-gradient(420px 320px at 90% 0%, rgba(46, 155, 214, 0.22), transparent 65%),
      linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: auto, 36px 36px, 36px 36px;
    color: #e9f6fd;
    scrollbar-width: none;
  }
  .web-side::-webkit-scrollbar { width: 0; }

  .ws-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 4px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
    flex-shrink: 0;
  }
  .ws-brand b {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #f4fbff;
    letter-spacing: -0.01em;
  }
  .ws-brand em {
    display: block;
    font-family: var(--latin);
    font-style: normal;
    font-size: 8.5px;
    letter-spacing: 0.18em;
    color: rgba(178, 219, 236, 0.55);
    margin-top: 2px;
  }

  .ws-label {
    font-family: var(--latin);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(168, 210, 228, 0.42);
    margin: 20px 8px 7px;
  }

  .ws-nav { display: flex; flex-direction: column; gap: 2px; }
  .ws-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 10px;
    border-radius: 8px;
    color: rgba(222, 242, 250, 0.74);
    font-size: 13px;
    text-align: left;
    transition: background 0.16s ease, color 0.16s ease;
  }
  .ws-nav-item em {
    margin-left: auto;
    font-family: var(--latin);
    font-style: normal;
    font-size: 8.5px;
    letter-spacing: 0.1em;
    color: rgba(180, 215, 232, 0.34);
  }
  .ws-nav-item:hover { background: rgba(255, 255, 255, 0.07); color: #ffffff; }
  .ws-nav-item.is-active { background: rgba(255, 255, 255, 0.11); color: #ffffff; }
  .ws-nav-item.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 13px;
    bottom: 13px;
    width: 2px;
    border-radius: 2px;
    background: var(--accent);
  }
  .ws-nav-item.is-active svg { color: var(--accent); }

  .ws-routes { display: flex; flex-direction: column; gap: 1px; }
  .ws-route {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 7px;
    color: rgba(220, 240, 250, 0.72);
    font-size: 11.5px;
    text-align: left;
    transition: background 0.16s ease;
  }
  .ws-route:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
  .ws-route span { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
  .ws-route b { font-weight: 500; font-size: 11.5px; white-space: nowrap; }
  .ws-route em {
    font-family: var(--num);
    font-style: normal;
    font-size: 9px;
    letter-spacing: 0.06em;
    color: rgba(170, 210, 228, 0.45);
  }
  .ws-route svg { color: rgba(160, 214, 234, 0.45); flex-shrink: 0; }

  .ws-spacer { flex: 1; min-height: 24px; }

  .ws-contact {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
  }
  .ws-contact span {
    font-size: 9.5px;
    letter-spacing: 0.03em;
    color: rgba(170, 210, 228, 0.45);
  }
  .ws-contact b {
    font-family: var(--num);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #d9f3fd;
  }
  .ws-contact small { font-size: 9.5px; color: rgba(170, 210, 228, 0.4); }

  .ws-notes {
    height: 38px;
    margin-top: 10px;
    border: 1px solid rgba(140, 201, 226, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #bfe4f4;
    font-size: 11.5px;
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
  }
  .ws-notes:hover { background: rgba(255, 255, 255, 0.11); border-color: rgba(170, 220, 240, 0.55); }
  .ws-foot {
    margin: 10px 0 0;
    text-align: center;
    font-size: 9px;
    letter-spacing: 0.03em;
    color: rgba(170, 205, 222, 0.34);
  }

  .app-top {
    padding: 16px 40px;
    background: rgba(242, 247, 250, 0.9);
    border-bottom: 1px solid var(--line);
  }
  .at-brand { display: none; }
  .at-back {
    width: 34px;
    height: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
  }
  .at-title { flex-direction: row; align-items: baseline; gap: 12px; }
  .at-title b { font-size: 20px; }
  .at-title span { display: block; }
  .at-help { height: 38px; padding: 0 14px; font-size: 12.5px; }
  .at-help span { display: inline; }

  .mp-content {
    padding: 16px 40px 56px;
  }
  .mp-screen {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    animation: fadeUp 0.26s ease;
  }
  .mp-screen > * {
    margin-left: 0;
    margin-right: 0;
  }

  /* —— 首页 —— */
  .page-home { padding-top: 4px; }
  .page-home .home-hero {
    height: 366px;
    border-radius: 22px;
    margin-top: 0;
  }
  .page-home .hero-content { padding: 24px 30px 58px; }
  .page-home .hero-title { font-size: 42px; letter-spacing: -0.035em; }
  .page-home .hero-sub { font-size: 13.5px; max-width: 460px; }
  .page-home .hero-chip { height: 26px; font-size: 10px; }
  .page-home .home-query {
    margin-top: -44px;
    padding: 22px 24px 18px;
    border-radius: 18px;
  }
  .page-home .home-query-head b { font-size: 16px; }
  .page-home .home-route { padding: 15px 18px; border-radius: 12px; }
  .page-home .hr-port { font-size: 18px; }
  .page-home .hr-label { font-size: 10.5px; }
  .page-home .quick-routes { padding-top: 14px; }
  .page-home .quick-routes button { height: 34px; font-size: 12px; }
  .page-home .home-cats { margin-top: 22px; gap: 12px; }
  .page-home .cat-pill { height: 42px; font-size: 13px; padding: 0 16px; }
  .page-home .stats { margin-top: 28px; max-width: none; }
  .page-home .stat b { font-size: 36px; }
  .page-home .stat span { font-size: 11px; }
  .page-home .home-block { margin-top: 30px; }
  .page-home .home-block-head { margin-bottom: 14px; }
  .page-home .advantage-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
  }
  .page-home .adv,
  .page-home .adv:first-child {
    border-top: 1px solid var(--line);
    padding: 16px 0 0;
  }
  .page-home .adv-ico { width: 38px; height: 38px; }
  .page-home .adv b { font-size: 13.5px; }
  .page-home .adv p { font-size: 11.5px; }
  .page-home .company-card {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    align-items: stretch;
  }
  .page-home .company-card img { height: 100%; min-height: 214px; }
  .page-home .cc-body {
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .page-home .cc-body b { font-size: 15px; }
  .page-home .cc-body p { font-size: 11.5px; line-height: 1.8; }
  .page-home .cc-row { margin-top: 14px; padding-top: 12px; }
  .page-home .page-foot { margin-top: 32px; }

  /* —— 服务 —— */
  .page-services .service-hero { padding: 28px 30px; border-radius: 18px; }
  .page-services .service-hero h2 { font-size: 28px; }
  .page-services .service-hero p { font-size: 12.5px; max-width: 520px; }
  .page-services .svc-main { max-width: 540px; margin-top: 18px; padding: 15px 16px; }
  .page-services .svc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 14px 0 0;
  }
  .page-services .svc-tile { min-height: 134px; padding: 16px; }
  .page-services .svc-tile b { font-size: 14px; }
  .page-services .svc-tile span { font-size: 11px; line-height: 1.6; }
  .page-services .svc-tip { margin: 18px 0 0; }
  .page-services .svc-grid + .svc-tip { margin-top: 18px; }

  /* —— 查询 —— */
  .page-query > * {
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
  .page-query .query-hero { padding: 10px 0 0; }
  .page-query .query-hero h1 { font-size: 30px; margin-top: 10px; }
  .page-query .query-hero p { font-size: 12.5px; }
  .page-query .route-card { margin-top: 18px; padding: 8px; border-radius: 18px; }
  .page-query .route-field { min-height: 70px; padding: 13px 16px; }
  .page-query .rf-value b { font-size: 20px; }
  .page-query .query-block { margin-top: 22px; }
  .page-query .box-opt { min-height: 58px; }
  .page-query .query-actions { margin-top: 26px; }
  .page-query .query-hint { padding: 0 0 20px; }
  .page-query .field-error { margin-left: auto; margin-right: auto; }

  /* —— 报价结果 —— */
  .page-results > * {
    width: 100%;
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
  }
  .page-results .result-top { margin-top: 0; padding: 18px 22px; }
  .page-results .rr-code { font-size: 28px; }
  .page-results .sort-row { padding: 18px 0 12px; }
  .page-results .sort-chip { height: 32px; font-size: 12px; }
  .page-results .quote-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
  }
  .page-results .quote { display: flex; flex-direction: column; height: 100%; padding: 16px 16px 0; }
  .page-results .quote-foot { margin-top: auto; }
  .page-results .quote-divider { margin-left: -16px; margin-right: -16px; }
  .page-results .skeleton-card { min-height: 190px; }
  .page-results .result-foot { padding: 20px 0 26px; }
  .page-results .empty { max-width: 620px; margin: 0 auto; padding: 44px 24px 30px; }
  .page-results .empty-alt { max-width: 520px; }

  /* —— 需求提交 / 成功 —— */
  .page-submit > *, .page-success > * {
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
  .page-submit .form-route { margin-top: 16px; }
  .page-submit .form-card { margin-top: 14px; padding: 6px 20px; }
  .page-submit .form-row { padding: 15px 0; }
  .page-submit .form-actions { padding: 20px 0 12px; }
  .page-success > * { max-width: 560px; }
  .page-success .success { padding-top: 54px; }
  .page-success .seal { width: 92px; height: 92px; }
  .page-success .success h2 { font-size: 24px; }

  /* —— 记录类 —— */
  .page-list > *, .page-detail > *, .page-profile > * {
    width: 100%;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }
  .page-list .record-list { padding: 16px 0 28px; }
  .page-list .filter-bar { padding-left: 0; padding-right: 0; padding-top: 14px; }
  .page-detail .detail-head { margin-top: 8px; }
  .page-detail .timeline-card { margin-top: 14px; padding: 20px; }
  .page-profile .profile-head { padding: 6px 0 0; }
  .page-profile .profile-card { margin-top: 4px; padding: 22px; }
  .page-profile .menu-card { margin-top: 14px; }
  .page-profile .page-foot { margin-top: 30px; }

  .mp-toast { bottom: 34px; left: calc(50% + 126px); }
  .sheet-mask { justify-content: center; padding-left: 252px; }
  .sheet { max-width: 640px; }
  .notes-inner { padding-top: 44px; }
}

/* ---------------- 中小屏（平板 / 手机） ---------------- */
@media (max-width: 899px) {
  .mp-content { padding-bottom: 0; }
  .quick-routes { gap: 6px; }
  .quick-routes button { padding: 0 9px; font-size: 11.5px; gap: 4px; }
  .home-query .home-route { padding: 10px 11px; }
  .home-query .hr-port { font-size: 14.5px; }
  .mp-tabbar {
    height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mp-toast { bottom: 88px; }
  .sheet { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}

@media (min-width: 600px) and (max-width: 899px) {
  .mp-content { padding: 0 20px; }
  .page-results .quote-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .mp-screen { animation: none; }
}
