/* 益心守护 — 网页仅作演示载体，机内为 App 界面模拟 */

:root {
  --bg-page: #f6fbff;
  --color-title: #4a90e2;
  --color-call: #ff9500;
  --color-text: #1a1a1a;
  --color-text-secondary: #444;
  --color-border: #cfe3f5;
  --color-card: #ffffff;
  --shadow-soft: 0 8px 24px rgba(74, 144, 226, 0.12);
  --radius-lg: 20px;
  --radius-xl: 28px;
  --space: 18px;
  --font-base: 19px;
  --line-tall: 1.65;
  --bottom-nav-h: 68px;
  --home-indicator-block: 28px;
  --status-bar-h: 52px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  /* iPhone 16 Pro 屏幕 2622×1206：竖屏宽×高 = 1206×2622 */
  --phone-portrait-w: 1206;
  --phone-portrait-h: 2622;
  /* 适当放宽机身宽度，保证比例与留白 */
  --device-screen-inner-max-w: 428px;
  /* 略微缩小灵动岛尺寸，避免与两侧图标压迫感过强 */
  --island-w: 112px;
  --island-h: 32px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: var(--font-base);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background: linear-gradient(180deg, #f6fbff 0%, #eaf4ff 55%, #f6fbff 100%);
  color: var(--color-text);
  line-height: var(--line-tall);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px 18px;
  position: relative;
  overflow-x: hidden;
}

/* 外层气泡装饰：克制、低透明度、不抢主体 */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -20vh -20vw;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

body::before {
  background:
    radial-gradient(circle at 18% 20%, rgba(74, 144, 226, 0.18) 0 80px, transparent 90px),
    radial-gradient(circle at 82% 18%, rgba(255, 149, 0, 0.12) 0 70px, transparent 82px),
    radial-gradient(circle at 16% 78%, rgba(74, 144, 226, 0.12) 0 110px, transparent 125px),
    radial-gradient(circle at 86% 78%, rgba(74, 144, 226, 0.10) 0 95px, transparent 112px);
  filter: blur(0.4px);
}

body::after {
  background:
    radial-gradient(circle at 40% 12%, rgba(255, 255, 255, 0.65) 0 90px, transparent 105px),
    radial-gradient(circle at 62% 36%, rgba(255, 255, 255, 0.55) 0 120px, transparent 138px),
    radial-gradient(circle at 30% 56%, rgba(255, 255, 255, 0.45) 0 80px, transparent 96px),
    radial-gradient(circle at 70% 82%, rgba(255, 255, 255, 0.45) 0 100px, transparent 118px);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* 轻提示 Toast：替代浏览器 alert，更像 App */
.toast-host {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: min(92vw, 520px);
  z-index: 9999;
  pointer-events: none;
}

.toast {
  margin: 0 auto;
  background: rgba(28, 28, 30, 0.92);
  color: #fff;
  padding: 12px 14px;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.toast--show {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 作业呈现层（浏览器内说明，不属于 App 界面） ---------- */
.demo-banner {
  text-align: center;
  max-width: 520px;
  margin-bottom: 20px;
  color: #1f4f87;
  z-index: 1;
}

.demo-banner,
.device-caption {
  display: none;
}

.demo-banner__title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.demo-banner__subtitle {
  margin: 0;
  font-size: 0.95rem;
  opacity: 0.88;
  line-height: 1.55;
}

/* ---------- 手机外框：iPhone 16 Pro 竖屏比例 1206:2622，居中 ---------- */
.device-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px;
  z-index: 1;
}

.device-frame {
  width: fit-content;
  max-width: 100%;
  padding: 13px;
  background: linear-gradient(
    155deg,
    #7c7c80 0%,
    #4a4a4f 25%,
    #353538 55%,
    #2a2a2d 100%
  );
  border-radius: 50px;
  box-shadow:
    0 36px 72px rgba(0, 0, 0, 0.55),
    0 10px 24px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4);
}

/* 机内屏幕：严格按 1206×2622 竖屏比例；过高时按视口高度缩窄保持比例 */
.device-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(
    var(--device-screen-inner-max-w),
    calc(92vh * var(--phone-portrait-w) / var(--phone-portrait-h))
  );
  max-width: 100%;
  aspect-ratio: var(--phone-portrait-w) / var(--phone-portrait-h);
  background: var(--bg-page);
  border-radius: 40px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

/* 顶部状态栏 + 居中灵动岛（Pro 系列特征） */
.status-bar--pro {
  flex-shrink: 0;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  min-height: var(--status-bar-h);
  /* 加大左右内边距，为中间灵动岛留出安全区 */
  padding: 10px 18px 6px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1c1c1e;
  background: var(--bg-page);
  z-index: 2;
}

.status-bar__time {
  padding-top: 2px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  /* 避免时间文字过长时侵入中间灵动岛区域 */
  max-width: 32%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-bar__icons {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  opacity: 0.92;
  /* 已移除灵动岛，不再限制宽度，避免“5G”被裁成“G” */
  max-width: none;
  justify-content: flex-end;
  overflow: visible;
}

.status-bar__cell {
  font-weight: 700;
  font-size: 0.68rem;
}

.status-bar__wifi {
  font-size: 0.85rem;
  opacity: 0.9;
}

.status-bar__battery {
  letter-spacing: 1px;
  font-size: 0.65rem;
}

/* 灵动岛：顶部居中黑色胶囊 */
.dynamic-island {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: var(--island-w);
  height: var(--island-h);
  background: #0a0a0a;
  border-radius: 22px;
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.06),
    0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
}

.dynamic-island {
  display: none;
}

.dynamic-island__lens {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1a1a2e, #0d0d12 70%);
  box-shadow: inset 0 0 3px rgba(0, 0, 80, 0.35);
}

.dynamic-island__lens--r {
  width: 9px;
  height: 9px;
  opacity: 0.85;
}

.app-body {
  flex: 1;
  position: relative;
  min-height: 0;
}

/* 单屏全屏切换（模拟 App 多界面） */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg-page);
}

.screen--active {
  display: flex;
}

.screen[hidden] {
  display: none !important;
}

.screen--active:not([hidden]) {
  display: flex;
}

.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;
}

/* 首页顶栏：左登录 + 中搜索 */
.home-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 12px;
  background: var(--bg-page);
}

.btn-login {
  flex-shrink: 0;
  padding: 12px 18px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-title);
  background: #fff;
  border: 2px solid var(--color-title);
  border-radius: var(--radius-lg);
  min-height: 50px;
  min-width: 88px;
}

.btn-login:active {
  opacity: 0.88;
}

.home-search-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  min-height: 50px;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.08);
}

.home-search__icon {
  flex-shrink: 0;
  color: var(--color-title);
  display: flex;
  opacity: 0.85;
}

.home-search {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  outline: none;
}

.home-search::placeholder {
  color: #6b7a8c;
}

/* 横幅广告 */
.home-banner {
  margin: 0 0 18px;
  padding: 18px 16px;
  background: linear-gradient(135deg, #d9ecff 0%, #e8f4ff 45%, #d4e8fc 100%);
  border-radius: var(--radius-xl);
  border: 2px solid rgba(74, 144, 226, 0.28);
  box-shadow: 0 4px 14px rgba(74, 144, 226, 0.12);
  text-align: center;
}

.home-banner__text {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #2a6bb5;
  line-height: 1.45;
}

/* 服务选择 */
.home-section {
  margin-bottom: 20px;
}

.home-section__title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-title);
  letter-spacing: 0.04em;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 10px;
}

.service-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px 14px;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.service-item:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

.service-item__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: var(--color-title);
}

.service-item__icon svg {
  width: 32px;
  height: 32px;
}

.service-item__icon--1 {
  background: linear-gradient(145deg, #e8f4ff, #d0e8fc);
}
.service-item__icon--2 {
  background: linear-gradient(145deg, #e4f7ed, #cceee0);
  color: #2d8f5a;
}
.service-item__icon--3 {
  background: linear-gradient(145deg, #e5f0ff, #d4e5fc);
  color: #3a7bc8;
}
.service-item__icon--4 {
  background: linear-gradient(145deg, #fff3e6, #ffe0c2);
  color: #c9781a;
}
.service-item__icon--5 {
  background: linear-gradient(145deg, #f0edff, #e0d9fc);
  color: #6b5bb3;
}
.service-item__icon--6 {
  background: linear-gradient(145deg, #ffe8ec, #ffd4dc);
  color: #c44d6a;
}
.service-item__icon--7 {
  background: linear-gradient(145deg, #e8faf5, #d0f0e8);
  color: #2a9d7a;
}
.service-item__icon--8 {
  background: linear-gradient(145deg, #fff8e6, #ffefc4);
  color: #b8860b;
}
.service-item__icon--9 {
  background: linear-gradient(145deg, #f2f2f7, #e4e4ea);
  color: #4a4a5c;
}

.service-item__icon--10 {
  background: linear-gradient(145deg, #ffe8e8, #ffd0d0);
  color: #c62828;
}

.service-item__label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.35;
}

/* 健康科普卡片 */
.article-card {
  background: var(--color-card);
  border-radius: calc(var(--radius-xl) + 4px);
  overflow: hidden;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.article-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.article-card--link:active {
  opacity: 0.92;
}

.article-card__cover {
  position: relative;
  height: 132px;
  background: linear-gradient(125deg, #a8d4ff 0%, #7ec3f0 35%, #b8e0c8 70%, #e8f6e0 100%);
  overflow: hidden;
}

.article-card__cover-deco {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath fill='rgba(255,255,255,0.2)' d='M0 40 Q25 20 50 35 T100 25 V60 H0Z'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
  opacity: 0.9;
}

.article-card__cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.article-card__body {
  padding: 16px 16px 18px;
}

.article-card__headline {
  margin: 0 0 10px;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.45;
}

.article-card__excerpt {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.sub-header {
  flex-shrink: 0;
  padding: 14px var(--space);
  text-align: center;
  background: var(--bg-page);
  border-bottom: 2px solid var(--color-border);
}

.sub-header__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-title);
}

.main-content {
  flex: 1;
  min-height: 0;
}

.main-content--scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 var(--space) var(--space);
}

.main-content--scroll.main-content--home {
  padding: 0 14px 18px;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius-xl);
  padding: var(--space) calc(var(--space) + 2px);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.card__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--color-title);
}

.card__subtitle {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}

.card__list {
  margin: 0;
  padding-left: 1.3em;
}

.card__list li {
  margin-bottom: 10px;
}

.card__tip {
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.placeholder-block {
  text-align: center;
  padding: 28px 12px;
}

.placeholder-block__lead {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--color-text);
}

.placeholder-block__text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.user-card {
  text-align: center;
  padding: 24px 16px;
  background: var(--color-card);
  border-radius: var(--radius-xl);
  border: 2px solid var(--color-border);
}

.user-card__avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  line-height: 72px;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-title);
  background: #e8f3fc;
  border-radius: 50%;
  border: 3px solid var(--color-border);
}

.user-card__name {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 700;
}

.user-card__hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* 登录页 */
.login-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 10px var(--space);
  background: var(--bg-page);
  border-bottom: 2px solid var(--color-border);
}

.btn-back {
  padding: 8px 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-title);
  min-height: 44px;
}

.login-bar__title {
  flex: 1;
  text-align: center;
  margin: 0;
  margin-right: 64px;
  font-size: 1.1rem;
  color: var(--color-title);
}

.login-placeholder {
  flex: 1;
  overflow-y: auto;
  padding: calc(var(--space) * 1.5) var(--space);
  text-align: center;
}

.login-placeholder__text {
  font-size: 1.05rem;
  margin: 0 0 14px;
}

.login-placeholder__hint {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin: 0;
}

/* 底栏区域（机内） */
.app-chrome {
  flex-shrink: 0;
  position: relative;
}

.app-chrome--hide-call .call-fab-wrap {
  display: none;
}

.device-screen--login .app-chrome {
  display: none;
}

/* 半圆形一键呼叫：对准底部中间「订单」栏上方 */
.call-fab-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--bottom-nav-h) + var(--home-indicator-block) + var(--safe-bottom));
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 50;
}

.call-fab {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 120px;
  height: 60px;
  padding-bottom: 6px;
  background: var(--color-call);
  color: #fff;
  border-radius: 120px 120px 0 0;
  box-shadow: 0 -4px 16px rgba(255, 149, 0, 0.35);
  font-weight: 700;
  transform: translateY(1px);
}

.call-fab:active {
  filter: brightness(0.96);
}

.call-fab__icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-bottom: 2px;
}

.call-fab__text {
  font-size: 0.88rem;
  letter-spacing: 0.05em;
}

.bottom-nav {
  display: flex;
  height: var(--bottom-nav-h);
  padding-bottom: 0;
  background: #fff;
  border-top: 2px solid var(--color-border);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  z-index: 40;
}

/* 底部 Home 指示条（全面屏机型常见） */
.home-indicator {
  flex-shrink: 0;
  box-sizing: border-box;
  height: calc(var(--home-indicator-block) + var(--safe-bottom));
  padding: 6px 0 var(--safe-bottom);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #fff;
  border-top: 1px solid rgba(207, 227, 245, 0.5);
}

.home-indicator::after {
  content: "";
  width: 38%;
  max-width: 148px;
  height: 5px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.22);
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  min-height: 44px;
}

.bottom-nav__item--active {
  color: var(--color-title);
}

.bottom-nav__icon {
  font-size: 1.15rem;
  line-height: 1;
}

/* 机内弹窗 */
.modal {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space);
}

.modal[hidden] {
  display: none !important;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: calc(var(--space) + 4px);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.modal__title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--color-title);
  text-align: center;
}

.modal__msg {
  margin: 0 0 20px;
  font-size: 1rem;
  text-align: center;
  color: var(--color-text);
}

.modal__actions {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  min-height: 48px;
}

.btn--secondary {
  background: #eef6fc;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn--primary {
  background: var(--color-title);
  color: #fff;
  border: 2px solid var(--color-title);
}

.btn:active {
  opacity: 0.92;
}

.device-caption {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: rgba(31, 79, 135, 0.78);
  text-align: center;
  max-width: 360px;
  line-height: 1.5;
}

/* -------------------- 登录后通用组件（新增，不影响原样式） -------------------- */
.service-item--link {
  text-decoration: none;
  color: inherit;
}

.app-chrome--hide-call .call-fab-wrap {
  display: none !important;
}

.sub-header--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sub-header__left-spacer,
.sub-header__right-spacer {
  width: 72px;
  height: 1px;
}

.link-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--color-title);
  text-decoration: none;
  font-weight: 700;
}

.btn--block {
  width: 100%;
}

.card--mt {
  margin-top: 14px;
}

.bullets {
  margin: 10px 0 0;
  padding-left: 1.2em;
}

.bullets li {
  margin-bottom: 10px;
}

.hint {
  margin: 10px 2px 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* 用户信息条（替代登录按钮） */
.user-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.user-chip__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e8f3fc;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--color-title);
}

.user-chip__name {
  display: block;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
}

.user-chip__sub {
  display: block;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.2;
  margin-top: 2px;
}

/* 半屏弹窗（确认/地址） */
.sheet-modal {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sheet-modal[hidden] {
  display: none !important;
}

.sheet-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.sheet-modal__panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 18px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.sheet-modal__title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--color-title);
  text-align: center;
  font-weight: 900;
}

.sheet-modal__msg {
  margin: 0 0 12px;
  text-align: center;
  font-size: 1rem;
}

.sheet-modal__actions {
  display: flex;
  gap: 10px;
}

.addr-box {
  background: #f6fbff;
  border: 2px solid var(--color-border);
  border-radius: 18px;
  padding: 12px 12px;
  margin: 0 0 14px;
}

.addr-box__main {
  margin: 0 0 6px;
  font-weight: 900;
}

.addr-box__sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* AI 对话框 */
.ai-chat {
  position: absolute;
  inset: 0;
  z-index: 130;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
}

.ai-chat[hidden] {
  display: none !important;
}

.ai-chat__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 12px;
  border-bottom: 2px solid var(--color-border);
  background: #fff;
  position: relative;
}

.ai-chat__title {
  font-weight: 900;
  color: var(--color-title);
}

.ai-chat__close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-title);
}

.ai-chat__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.msg--ai {
  align-self: flex-start;
  background: #fff;
  border: 2px solid var(--color-border);
}

.msg--user {
  align-self: flex-end;
  background: #d9ecff;
  border: 2px solid rgba(74, 144, 226, 0.35);
}

/* 服务人员卡片（参考您提供的 carer.html 风格） */
.worker-card {
  background: #fff;
  border-radius: 24px;
  padding: 18px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.worker-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #e0efff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--color-title);
  flex-shrink: 0;
  overflow: hidden;
}

.worker-avatar--photo {
  color: transparent;
  text-shadow: none;
}

.worker-avatar--sm {
  width: 52px;
  height: 52px;
}

.worker-avatar--lg {
  width: 76px;
  height: 76px;
}

.worker-name {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 900;
}

.worker-name--lg {
  font-size: 1.15rem;
}

.worker-stars {
  margin: 0 0 6px;
  color: var(--color-call);
  font-size: 0.92rem;
  font-weight: 800;
}

.worker-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.worker-desc--lg {
  margin-top: 10px;
  font-size: 0.95rem;
}

.worker-meta {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}

.worker-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* 我的页 */
.btn-switch {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 2px solid var(--color-title);
  color: var(--color-title);
  background: #fff;
  font-weight: 900;
  font-size: 0.9rem;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 14px;
  border-radius: 24px;
  background: #fff;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
  margin-bottom: 14px;
}

.profile-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e0efff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--color-title);
}

.profile-card__name {
  margin: 0 0 6px;
  font-weight: 900;
  font-size: 1.1rem;
}

.profile-card__phone {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
}

.profile-card__arrow {
  margin-left: auto;
  font-size: 1.4rem;
  color: #7a8aa0;
  font-weight: 900;
}

.menu-card {
  background: #fff;
  border-radius: 24px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 14px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid #eef6fc;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item::after {
  content: "›";
  color: #7a8aa0;
  font-weight: 900;
}

.menu-item--btn {
  width: 100%;
  background: #fff;
  text-align: left;
}

/* 订单页 */
.order-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.order-tab {
  flex: 1;
  min-height: 48px;
  border-radius: 16px;
  background: #fff;
  border: 2px solid var(--color-border);
  font-weight: 900;
  color: var(--color-text-secondary);
}

.order-tab--active {
  background: var(--color-title);
  border-color: var(--color-title);
  color: #fff;
}

.order-card {
  display: block;
  background: #fff;
  border-radius: 24px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  margin-bottom: 14px;
  text-decoration: none;
  color: inherit;
}

.order-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.order-card__name {
  margin: 0;
  font-weight: 900;
}

.order-card__svc {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.order-card__rows {
  border-top: 1px solid #eef6fc;
  padding-top: 8px;
}

.order-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.9rem;
}

.order-row__k {
  color: var(--color-text-secondary);
}

.badge {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.badge--orange {
  background: #fff3e0;
  color: var(--color-call);
  border: 1px solid rgba(255, 149, 0, 0.35);
}

.badge--green {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.25);
}

.badge--blue {
  background: #e8f3fc;
  color: var(--color-title);
  border: 1px solid rgba(74, 144, 226, 0.25);
}

/* 信息表格 */
.kv {
  margin-top: 10px;
}

.kv__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #eef6fc;
}

.kv__row:first-child {
  border-top: none;
}

.kv__k {
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.kv__v {
  text-align: right;
}

.kv__row--total .kv__v {
  font-weight: 900;
  color: var(--color-call);
}

.timeline {
  margin: 10px 0 0;
  padding-left: 18px;
}

.timeline__item {
  margin-bottom: 10px;
  color: var(--color-text-secondary);
}

.timeline__item--done {
  color: var(--color-title);
  font-weight: 900;
}

.actions-row {
  display: flex;
  gap: 10px;
}

/* 地址卡 */
.addr-card {
  position: relative;
  background: #fff;
  border-radius: 24px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  margin-bottom: 14px;
}

.addr-card__main {
  margin: 0 0 6px;
  font-weight: 900;
}

.addr-card__sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.addr-card--active {
  border-color: rgba(74, 144, 226, 0.55);
}

.addr-card .badge {
  position: absolute;
  right: 12px;
  top: 12px;
}

/* 字体大小选项 */
.font-opts {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.font-opt {
  flex: 1;
  min-height: 50px;
  border-radius: 18px;
  border: 2px solid var(--color-border);
  background: #fff;
  font-weight: 900;
  color: var(--color-text-secondary);
}

.font-opt--active {
  border-color: var(--color-title);
  background: #e8f3fc;
  color: var(--color-title);
}

/* 登录页独立布局 */
.login-page {
  height: 100%;
  padding: 22px 18px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-page__header {
  text-align: center;
  margin-bottom: 22px;
}

.login-page__title {
  margin: 0;
  color: var(--color-title);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-page__desc {
  margin: 10px 0 0;
  color: var(--color-text-secondary);
  font-size: 0.96rem;
}

.login-page__actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-role-btn {
  width: 100%;
  min-height: 62px;
  padding: 14px 20px;
  border-radius: 22px;
  background: var(--color-title);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 800;
  border: 2px solid var(--color-title);
  box-shadow: 0 6px 16px rgba(74, 144, 226, 0.2);
}

.login-role-btn--secondary {
  background: #fff;
  color: var(--color-title);
}

.login-form-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 18px;
  border: 2px solid var(--color-border);
  background: #fff;
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.12);
}

.login-form-box__role {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--color-text-secondary);
}

.login-form-box__label {
  display: block;
  margin: 10px 0 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #4e6c8e;
}

.login-form-box__input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  background: #fff;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--color-text);
}

.login-form-box__input:focus {
  outline: none;
  border-color: var(--color-title);
}

.login-form-box .login-role-btn {
  margin-top: 14px;
  min-height: 52px;
  border-radius: 16px;
}

.login-form-box__reset {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-title);
  border-radius: 12px;
  border: 2px solid var(--color-border);
  background: #fff;
}

/* 搜索结果面板 */
.search-result {
  margin: 0 14px 12px;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(74, 144, 226, 0.14);
  overflow: hidden;
}

.search-result__item {
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid #e7f1fb;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 600;
  background: #fff;
}

.search-result__item:last-child {
  border-bottom: none;
}

.search-result__empty {
  margin: 0;
  padding: 12px 14px;
  color: var(--color-text-secondary);
  font-size: 0.9rem;
}

/* ========== 家属端登录后扩展 ========== */

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  max-width: 42%;
}

.user-chip__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #e8f3fc;
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--color-title);
  flex-shrink: 0;
}

.user-chip__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-chip__name {
  font-weight: 800;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-chip__sub {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.service-item--link {
  text-decoration: none;
  color: inherit;
}

.article-card--clickable {
  cursor: pointer;
}

.sub-header--row {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding-left: 8px;
  padding-right: 8px;
}

.sub-header--row .sub-header__title {
  flex: 1;
  text-align: center;
  margin: 0;
}

.link-back {
  flex-shrink: 0;
  padding: 8px 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-title);
  text-decoration: none;
  min-width: 48px;
}

.page-head-actions {
  position: absolute;
  right: var(--space);
  top: 50%;
  transform: translateY(-50%);
}

.btn-text {
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-title);
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.top-bar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 8px 12px;
  background: var(--bg-page);
}

.sheet-modal {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.sheet-modal[hidden] {
  display: none !important;
}

.sheet-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.sheet-modal__panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 18px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.sheet-modal__title {
  margin: 0 0 10px;
  text-align: center;
  color: var(--color-title);
  font-size: 1.12rem;
}

.sheet-modal__msg {
  margin: 0 0 18px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.55;
}

.sheet-modal__actions {
  display: flex;
  gap: 10px;
}

.btn--block {
  width: 100%;
  margin-top: 14px;
}

.ai-chat {
  position: absolute;
  inset: 0;
  z-index: 130;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
}

.ai-chat[hidden] {
  display: none !important;
}

.ai-chat__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 44px 12px 12px;
  border-bottom: 2px solid var(--color-border);
  background: #fff;
  position: relative;
  flex-shrink: 0;
}

.ai-chat__title {
  font-weight: 800;
  color: var(--color-title);
  font-size: 1.05rem;
}

.ai-chat__close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-title);
  background: #f0f6fc;
  border: 2px solid var(--color-border);
}

.ai-chat__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
}

.msg {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 0.96rem;
  line-height: 1.55;
}

.msg--ai {
  align-self: flex-start;
  background: #fff;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.msg--user {
  align-self: flex-end;
  background: linear-gradient(180deg, #e8f4ff 0%, #d9ecff 100%);
  border: 2px solid rgba(74, 144, 226, 0.35);
}

.svc-hero {
  background: var(--color-card);
  border-radius: var(--radius-xl);
  padding: var(--space);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

.svc-hero__title {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-title);
}

.svc-hero__text {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.worker-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}

.worker-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: inherit;
}

.worker-card:active {
  opacity: 0.92;
}

.worker-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e8f3fc;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-title);
}

.worker-card__body {
  flex: 1;
  min-width: 0;
}

.worker-card__name {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.worker-card__stars {
  color: var(--color-call);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.worker-card__desc {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.45;
}

.worker-detail__block {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 16px;
  border: 2px solid var(--color-border);
  margin-bottom: 14px;
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.98rem;
  border-bottom: 1px solid #eef6fc;
}

.order-summary-row:last-child {
  border-bottom: none;
}

.order-summary-row--strong {
  font-weight: 800;
  color: var(--color-title);
  font-size: 1.05rem;
}

.order-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 14px;
}

.order-tab {
  flex: 1;
  padding: 12px 8px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  background: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.order-tab--active {
  background: var(--color-title);
  color: #fff;
  border-color: var(--color-title);
}

.order-card-lg {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 16px;
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  margin-bottom: 14px;
  text-decoration: none;
  color: inherit;
  display: block;
}

.order-card-lg__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.order-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.order-badge--wait {
  background: #fff3e0;
  color: #e65100;
}

.order-badge--ing {
  background: #e3f2fd;
  color: #1565c0;
}

.order-badge--done {
  background: #e8f5e9;
  color: #2e7d32;
}

.profile-user {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: #fff;
  border-radius: var(--radius-xl);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-soft);
  margin-bottom: 16px;
}

.profile-user__avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #e8f3fc;
  border: 3px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-title);
}

.profile-user__name {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.profile-user__phone {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin: 0;
}

.profile-menu {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 2px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.profile-menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid #eef6fc;
}

.profile-menu__item:last-child {
  border-bottom: none;
}

.profile-menu__item::after {
  content: "›";
  color: #999;
  font-size: 1.2rem;
}

.info-block {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 16px;
  border: 2px solid var(--color-border);
  margin-bottom: 14px;
}

.info-block__label {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.info-block__value {
  font-size: 1.02rem;
  font-weight: 600;
}

.font-size-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.font-opt {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
  background: #fff;
  font-weight: 700;
  text-align: center;
}

.font-opt--active {
  border-color: var(--color-title);
  background: #eef6fc;
  color: var(--color-title);
}

/* ====== 交互增强：定位、筛选、支付、表单、滑块 ====== */
.btn--mini {
  min-height: 42px;
  margin-top: 0;
  margin-bottom: 10px;
}

.locate-box {
  border: 2px dashed var(--color-border);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: #f8fcff;
}

.locate-box__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.locate-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3cb371;
  animation: pulse-dot 1.3s infinite;
}

@keyframes pulse-dot {
  0% { opacity: 0.35; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 0.35; transform: scale(0.9); }
}

.locate-box__bar {
  height: 6px;
  border-radius: 999px;
  background: #e9f3fc;
  overflow: hidden;
}

.locate-box__bar-fill {
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6fb4ff 0%, #4a90e2 100%);
  transition: width 0.8s ease;
}

.worker-filter-card {
  margin-bottom: 14px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}

.filter-label {
  flex-shrink: 0;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.filter-select {
  flex: 1;
  min-height: 40px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  background: #fff;
  padding: 0 10px;
  font: inherit;
  font-size: 0.88rem;
}

.filter-row--hour-picker {
  align-items: flex-start;
}

.hour-picker-anchor {
  flex: 1;
  min-width: 0;
  position: relative;
}

.hour-picker-trigger {
  width: 100%;
  text-align: left;
  padding: 0 10px;
}

.hour-picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 36;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(74, 144, 226, 0.14);
  max-height: min(33vh, 220px);
  overflow: hidden;
}

.hour-picker-list {
  max-height: inherit;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px;
}

.hour-picker-item {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: #fff;
  color: var(--color-text);
  font-size: 0.86rem;
  font-weight: 700;
}

.hour-picker-item + .hour-picker-item {
  margin-top: 6px;
}

.hour-picker-item--active {
  border-color: var(--color-title);
  background: #eaf4ff;
  color: var(--color-title);
}

.hour-picker-empty {
  margin: 0;
  padding: 12px 10px;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  text-align: center;
}

.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 2px solid var(--color-border);
  background: #fff;
  color: var(--color-text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
}

.filter-tag--active {
  border-color: var(--color-title);
  background: #eaf4ff;
  color: var(--color-title);
}

.pay-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.pay-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  border: 2px solid var(--color-border);
  background: #fff;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 700;
}

.pay-option span:last-child {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.pay-option--active {
  border-color: var(--color-title);
  background: #eaf4ff;
}

.font-slider-box {
  margin-top: 10px;
}

.font-slider-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.font-slider {
  width: 100%;
}

.font-preview {
  margin: 12px 0;
  background: #f8fcff;
  border: 2px solid var(--color-border);
  border-radius: 16px;
  padding: 12px;
}

.font-bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 8px;
  line-height: 1.5;
}

.font-bubble--left {
  background: #fff;
  border: 1px solid #e7f0f8;
}

.font-bubble--right {
  margin-left: auto;
  color: #fff;
  background: #4a90e2;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.form-input {
  min-height: 44px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  background: #fff;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.9rem;
  color: var(--color-text);
}

.form-input--textarea {
  min-height: 72px;
  resize: vertical;
}

.addr-card__actions {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}

.btn-link {
  color: var(--color-title);
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0;
}

/* 启动动画层（仅首页） */
.launch-overlay {
  position: absolute;
  inset: 0;
  z-index: 220;
  overflow: hidden;
  background: linear-gradient(180deg, #f6fbff 0%, #eaf4ff 100%);
}

.launch-overlay[hidden] {
  display: none !important;
}

.launch-overlay__skip {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 16px);
  right: 16px;
  z-index: 4;
  min-width: 72px;
  min-height: 34px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #2f74c7;
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(74, 144, 226, 0.16);
}

.launch-overlay__bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 22% 24%, rgba(74, 144, 226, 0.22) 0 120px, transparent 130px),
    radial-gradient(circle at 76% 76%, rgba(255, 149, 0, 0.2) 0 100px, transparent 112px),
    radial-gradient(circle at 60% 18%, rgba(74, 144, 226, 0.12) 0 140px, transparent 156px);
  filter: blur(1px);
  transform: scale(1);
  transition: transform 0.8s ease, opacity 0.6s ease;
}

.launch-overlay__scene {
  position: absolute;
  inset: 0;
}

.launch-overlay__brand {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 118px;
  height: 118px;
  margin-left: -59px;
  margin-top: -59px;
  border-radius: 30px;
  background: linear-gradient(180deg, #67b7ff 0%, #2e7de0 100%);
  box-shadow: 0 26px 58px rgba(47, 116, 199, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.58);
}

.launch-overlay__logo {
  width: 82px;
  height: 82px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 10px 22px rgba(74, 144, 226, 0.28);
}

.launch-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  background: rgba(125, 194, 255, 0.92);
  box-shadow: 0 0 0 10px rgba(125, 194, 255, 0.08);
  opacity: 0;
  transform: translate3d(var(--x, 0px), var(--y, 0px), 0) scale(0.55);
}

.launch-particle--1 { --x: -128px; --y: -92px; animation-delay: 0s; }
.launch-particle--2 { --x: 136px; --y: -104px; animation-delay: 0.05s; }
.launch-particle--3 { --x: -150px; --y: 18px; animation-delay: 0.1s; }
.launch-particle--4 { --x: 148px; --y: 22px; animation-delay: 0.15s; }
.launch-particle--5 { --x: -96px; --y: 126px; animation-delay: 0.2s; }
.launch-particle--6 { --x: 102px; --y: 132px; animation-delay: 0.25s; }
.launch-particle--7 { --x: -28px; --y: -156px; animation-delay: 0.3s; }
.launch-particle--8 { --x: 34px; --y: -150px; animation-delay: 0.35s; }
.launch-particle--9 { --x: -178px; --y: 78px; animation-delay: 0.4s; }
.launch-particle--10 { --x: 172px; --y: 74px; animation-delay: 0.45s; }
.launch-particle--11 { --x: -62px; --y: 166px; animation-delay: 0.5s; }
.launch-particle--12 { --x: 58px; --y: 166px; animation-delay: 0.55s; }

.launch-overlay__copy {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
}

.launch-overlay__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #2f74c7;
}

.launch-overlay__subtitle {
  margin: 0;
  font-size: 0.92rem;
  color: #4e6c8e;
}

.launch-overlay--playing .launch-particle {
  animation: bubble-converge 3.4s ease-in-out forwards;
}

.launch-overlay--playing .launch-overlay__brand {
  animation: icon-assemble 3.4s ease-in-out forwards;
}

.launch-overlay--playing .launch-overlay__copy {
  animation: launch-copy-in 1.2s ease 1.6s forwards;
}

.launch-overlay--playing .launch-overlay__bg {
  transform: scale(1.08);
}

.launch-overlay--fade {
  animation: launch-fade 0.42s ease forwards;
}

@keyframes bubble-converge {
  0% {
    opacity: 0;
    transform: translate3d(var(--x), var(--y), 0) scale(0.45);
  }
  12% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(1.05);
  }
}

@keyframes icon-assemble {
  0% {
    opacity: 0;
    transform: scale(0.58);
    filter: blur(2px);
  }
  28% {
    opacity: 0.6;
    transform: scale(0.82);
  }
  62% {
    opacity: 1;
    transform: scale(1.03);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes launch-copy-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes launch-fade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launch-overlay__bg,
  .launch-overlay__scene,
  .launch-overlay__copy,
  .launch-particle,
  .launch-overlay__brand {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- 选址弹层 / 地址簿（2026-04） ---------- */
.sheet-modal.addr-fullscreen {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  background: var(--bg-page);
  z-index: 200;
}

.sheet-modal.addr-fullscreen .sheet-modal__backdrop {
  display: none;
}

.sheet-modal.addr-fullscreen .sheet-modal__panel--address {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-height: 0;
  max-height: none;
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  text-align: left;
}

.sheet-modal.addr-fullscreen .addr-picker-list {
  flex: none;
  min-height: 0;
  max-height: none;
  overflow: visible;
  margin-bottom: 12px;
}

.sheet-modal__panel--address {
  max-width: 360px;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-align: left;
}

.sheet-modal__msg--left {
  text-align: left;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}

.addr-search-input {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.92rem;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.addr-current-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f6fbff;
  border: 2px solid var(--color-border);
  margin-bottom: 10px;
}

.sheet-modal.addr-fullscreen .addr-current-row {
  padding: 6px 8px;
  margin-bottom: 8px;
}

.btn-relocate-compact {
  padding: 2px 8px;
  min-height: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  flex-shrink: 0;
  white-space: nowrap;
  align-self: center;
}

.addr-current-row__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-title);
  margin-bottom: 2px;
}

.addr-current-row__main {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.addr-current-row__text {
  flex: 1;
  min-width: 0;
}

.addr-picker-section-title {
  margin: 4px 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--color-text-secondary);
}

.addr-picker-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.addr-picker-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px solid var(--color-border);
  background: #fff;
  font: inherit;
  cursor: pointer;
  box-sizing: border-box;
}

.addr-picker-item--active {
  border-color: #4a90e2;
  background: #f0f7ff;
}

.addr-picker-item__tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #2f74c7;
  margin-bottom: 4px;
}

.addr-picker-item__tag--muted {
  color: var(--color-text-secondary);
}

.addr-picker-item__main {
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.35;
}

.addr-picker-item__sub {
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
}

.addr-picker-empty {
  margin: 8px 0;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  text-align: center;
}

.sheet-modal .btn#btn-picker-add-address {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 0.82rem;
  border-radius: 10px;
}

.sheet-modal .btn#btn-picker-add-address::before {
  content: "+";
  margin-right: 4px;
  font-size: 0.9em;
  line-height: 1;
}

.btn--mt8 {
  margin-top: 8px;
}

.sheet-modal__actions--stack {
  margin-top: 14px;
  flex-direction: row;
}

.sub-header--workers {
  align-items: flex-start;
  padding-top: 6px;
  padding-bottom: 6px;
}

.sub-header__left-cluster {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 96px;
  flex-shrink: 0;
}

.sub-header__right-spacer--narrow {
  width: 96px;
  flex-shrink: 0;
}

.sub-header__title-block {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.sub-header--workers .sub-header__title {
  flex: 0 1 auto;
}

.sub-header__title--sm {
  font-size: 1rem;
  line-height: 1.2;
}

.sub-header--workers-v2 {
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sub-header--workers-v2 .link-back {
  flex-shrink: 0;
  margin-top: 2px;
}

.sub-header--workers-v2 .sub-header__title-block {
  flex: 1;
  min-width: 0;
  padding: 0 4px;
}

.workers-title-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  max-width: 100%;
}

.workers-title-line1 {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.25;
  color: var(--color-title);
}

.workers-title-line2 {
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--color-text-secondary);
  max-width: 100%;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.workers-addr-hint {
  margin: 6px 0 0;
  padding: 0 2px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  line-height: 1.45;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  max-width: 100%;
}

.sub-header--workers-v2 .btn-locate-pin {
  flex-shrink: 0;
  margin-top: 2px;
}

.btn-locate-pin {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  background: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  color: var(--color-title);
}

.btn-locate-pin--svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f74c7;
  border-color: #cfe3f8;
  background: #f0f7ff;
}

.btn-locate-pin--svg svg {
  display: block;
}

.sub-header--addr-book .sub-header__title {
  flex: 1;
  text-align: center;
  margin: 0;
}

.sub-header__title--nowrap {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.98rem;
}

.sub-header--addr-book .sub-header__actions {
  width: auto;
  max-width: 52%;
  flex-shrink: 1;
}

.sub-header--addr-book .btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 5px 9px;
  font-size: 0.8rem;
  min-height: 28px;
  border-radius: 10px;
  line-height: 1;
}

.sub-header__actions {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
  width: fit-content;
  max-width: 52%;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.btn-text--primary {
  border-color: #4a90e2;
  color: #2f74c7;
  background: #f0f7ff;
}

.btn-text--sm {
  min-height: 30px;
  padding: 4px 8px;
  font-size: 0.78rem;
  border-radius: 10px;
}

.addr-batch-bar {
  margin-bottom: 12px;
}

.addr-book-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  border: 2px solid var(--color-border);
  background: #fff;
  margin-bottom: 12px;
  box-shadow: var(--shadow-soft);
}

.addr-book-row--default {
  border-color: #4a90e2;
  background: #f8fcff;
}

.addr-book-row__check-wrap {
  display: flex;
  align-items: center;
  padding-top: 4px;
}

.addr-book-row__check {
  width: 20px;
  height: 20px;
}

.addr-book-row__body {
  flex: 1;
  min-width: 0;
}

.addr-book-row__main {
  margin: 4px 0 6px;
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.35;
}

.addr-book-row__sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--color-text-secondary);
}

.addr-book-row__links {
  margin-top: 8px;
}

.addr-book-row__edit {
  flex-shrink: 0;
  align-self: center;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: #f0f7ff;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #2f74c7;
}

.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-row-two__cell {
  min-width: 0;
}

.form-emergency-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-emergency-stack .form-row-two__cell {
  width: 100%;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-title);
}

.form-check input {
  width: 20px;
  height: 20px;
}

.addr-book-row__check-wrap--hidden {
  display: none !important;
}

.chat-screen {
  flex-direction: column;
  min-height: 0;
}

.chat-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}

.chat-composer {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-top: 2px solid var(--color-border);
}

.chat-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border-radius: 12px;
  border: 2px solid var(--color-border);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.92rem;
  box-sizing: border-box;
}

.chat-composer .chat-send {
  flex: 0 0 auto;
  align-self: center;
  min-width: 56px;
  min-height: 38px;
  padding: 6px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 10px;
}