/* “我的”页面：与吉真中药 MVP 统一的信息架构和交互基线。 */
.me-screen {
  padding: 8px 14px calc(92px + env(safe-area-inset-bottom));
  background: radial-gradient(circle at 86% 5%, rgba(219, 154, 85, 0.1), transparent 29%), #fffdf8;
}

.me-profile-wrap { min-height: 126px; position: relative; }
.me-screen .me-profile {
  min-height: 126px;
  padding: 22px 54px 18px 8px;
  border-radius: 0;
  background: transparent;
}
.me-screen .me-avatar {
  width: 62px;
  height: 62px;
  color: #fffaf2;
  background: linear-gradient(145deg, #d9a05f, #a96632);
  box-shadow: 0 9px 24px rgba(137, 86, 43, 0.2);
}
.me-screen .me-avatar .icon { width: 34px; height: 34px; }
.me-screen .me-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}
.me-screen .me-profile.is-guest {
  padding-left: 12px;
  gap: 13px;
}
.me-screen .me-profile.is-guest .me-avatar {
  width: 52px;
  height: 52px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(92, 64, 51, 0.06);
}
.me-screen .me-profile.is-guest .me-identity h1 {
  font-size: 16px;
  font-weight: 760;
  letter-spacing: 0;
}
.me-screen .me-profile.is-guest .me-identity p {
  margin-top: 3px;
  color: #99918a;
  font-size: 11px;
  line-height: 1.4;
}
.me-screen .me-identity h1 { color: #2d2824; font-size: 22px; font-weight: 760; letter-spacing: 0.02em; }
.me-screen .me-identity p { margin-top: 7px; color: #8c837b; font-size: 13px; }

.me-profile-edit {
  position: absolute;
  top: 36px;
  right: 5px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #625b55;
  background: transparent;
}
.me-profile-edit:active { opacity: 0.62; transform: scale(0.96); }
.me-profile-edit .line-icon {
  width: 22px;
  height: 22px;
  border-radius: 0;
  color: #8b857f;
  background: transparent;
}
.me-profile-edit .line-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.6;
}

.me-function-groups { display: grid; gap: 20px; }
.me-function-group h2 {
  margin: 0 3px 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3a332e;
  font-size: 14px;
  font-weight: 720;
}
.me-section-marker {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: linear-gradient(135deg, #d49350, #efb274);
  transform: rotate(45deg);
}
.me-service-list {
  overflow: hidden;
  border: 1px solid rgba(226, 215, 202, 0.66);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.93);
}
.me-service-row {
  width: 100%;
  min-height: 62px;
  padding: 0 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(230, 221, 211, 0.66);
  text-align: left;
  background: transparent;
}
.me-service-row:last-child { border-bottom: 0; }
.me-service-row:active { background: #fbf4ea; }
.me-service-row-leading,
.me-service-row-trailing { min-width: 0; display: flex; align-items: center; }
.me-service-row-leading { gap: 12px; }
.me-service-row-leading .line-icon { width: 26px; height: 26px; color: #5a5550; }
.me-service-row-leading .line-icon svg { width: 23px; height: 23px; stroke-width: 1.7; }
.me-service-row-leading .me-service-image-icon { position: relative; }
.me-service-row-leading .me-service-image-icon img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 37px;
  height: 37px;
  object-fit: contain;
  transform: translate(-50%, -50%);
}
.me-service-row-leading strong {
  overflow: hidden;
  color: #302a26;
  font-size: 15px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.me-service-row-trailing { gap: 8px; color: #a29a92; }
.me-service-row-trailing small { font-size: 12px; }
.me-service-row-trailing em { font-size: 23px; font-style: normal; font-weight: 300; }

.share-drawer-layer,
.confirm-layer { position: fixed; z-index: 90; inset: 0; display: grid; }
.share-drawer-layer { align-items: end; }
html:has(.share-drawer-layer), body:has(.share-drawer-layer),
html:has(.confirm-layer), body:has(.confirm-layer) { overflow: hidden; }
.share-drawer-mask,
.confirm-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(34, 31, 29, 0.56);
  animation: meMaskIn 160ms ease-out both;
}
.share-drawer-sheet {
  width: min(430px, 100vw);
  min-height: 238px;
  margin: 0 auto;
  padding: 24px 18px 20px;
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  border-radius: 22px 22px 0 0;
  background: #fff;
  box-shadow: 0 -16px 38px rgba(42, 31, 24, 0.16);
  animation: meSheetIn 220ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}
.share-drawer-sheet:focus,
.confirm-card:focus { outline: none; }
.share-drawer-sheet h2 { margin: 0; color: #2c2825; font-size: 17px; }
.share-channel-grid { width: 100%; margin-top: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.share-channel {
  min-width: 0;
  min-height: 80px;
  padding: 0 2px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 7px;
  border-radius: 12px;
}
.share-channel:active { background: #faf6f0; transform: scale(0.96); }
.share-channel-icon { width: 48px; height: 48px; }
.share-channel span { color: #39332f; font-size: 12px; white-space: nowrap; }
.share-drawer-close {
  width: 46px;
  height: 46px;
  margin-top: 5px;
  border-radius: 50%;
  color: #97918b;
  background: #f5f3f1;
  font-size: 29px;
  font-weight: 300;
  line-height: 1;
}
@keyframes meMaskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes meSheetIn { from { transform: translateY(100%); } to { transform: translateY(0); } }

.favorites-screen .topbar.has-right-actions { grid-template-columns: 90px minmax(0, 1fr) 90px; }
.favorites-screen .favorites-panel {
  margin-top: 4px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 215, 202, 0.68);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}
.favorites-screen .favorite-row {
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(230, 221, 211, 0.68);
}
.favorites-screen .favorite-row:last-child { border-bottom: 0; }
.favorites-screen .favorite-row-main {
  width: 100%;
  min-height: 76px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.favorites-screen .favorite-row-main:disabled {
  color: inherit;
  opacity: 1;
  cursor: default;
}
.favorite-kind {
  width: 48px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #8b5e32;
  background: #f8eee1;
  font-size: 11px;
  font-weight: 700;
}
.favorite-copy { min-width: 0; display: grid; gap: 5px; }
.favorite-copy strong,
.favorite-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-copy strong { color: #302925; font-size: 15px; }
.favorite-copy small { color: #8a8179; font-size: 12px; font-weight: 400; }
.favorite-row-main > em { color: #aaa29a; font-size: 22px; font-style: normal; font-weight: 300; }
.favorite-row.is-editing .favorite-row-main { padding-right: 48px; }
.favorite-remove {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  border-radius: 50%;
  color: #6d6761;
  background: transparent;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
}
.favorite-remove:active { opacity: 0.62; transform: translateY(-50%) scale(0.94); }
.favorites-manage-button { justify-self: end; width: 40px; height: 40px; display: grid; place-items: center; color: #6d6258; }
.favorites-manage-button .line-icon,
.favorites-manage-button .line-icon svg { width: 21px; height: 21px; }
.favorites-edit-actions { justify-self: end; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.favorites-edit-actions button,
.text-topbar-action { min-height: 38px; color: #96633c; font-size: 13px; white-space: nowrap; }
.favorites-edit-actions button:first-child { color: #b35148; }

body[data-route="favorites"] {
  height: 100vh;
  overflow: hidden;
}

body[data-route="favorites"] .phone-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.favorites-screen:not(.recent-screen) {
  height: calc(100vh - 32px);
  min-height: 0;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.favorites-screen:not(.recent-screen) .topbar {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 14px;
}

.favorites-screen:not(.recent-screen) .topbar > .icon-button:first-child {
  margin-left: -10px;
}

.favorites-screen:not(.recent-screen) .topbar-title h1 {
  color: #211d1a;
  font-size: 16px;
  font-weight: 650;
}

.favorites-screen:not(.recent-screen) .favorites-manage-button {
  width: 36px;
  height: 36px;
  color: #8b857f;
}

.favorites-screen:not(.recent-screen) .favorites-manage-button .line-icon {
  border-radius: 0;
  background: transparent;
}

.favorites-tabs {
  height: 44px;
  flex: 0 0 44px;
  padding: 0 16px;
  display: flex;
  align-items: stretch;
  gap: 30px;
  border-bottom: 1px solid #e9e3dc;
  background: #fff;
}

.favorites-tabs button {
  min-width: 34px;
  position: relative;
  padding: 0 1px;
  color: #716b66;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
}

.favorites-tabs button.is-active {
  color: #3b2c22;
  font-weight: 650;
}

.favorites-tabs button.is-active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: #b77936;
  transform: translateX(-50%);
}

.favorites-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: #fff;
}

.favorites-scroll::-webkit-scrollbar {
  display: none;
}

.favorite-group {
  border-top: 7px solid #f7f3ec;
  background: #fff;
}

.favorite-group:first-child {
  border-top: 0;
}

.favorite-group > h2 {
  min-height: 43px;
  margin: 0;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #36302c;
  font-size: 15px;
  font-weight: 650;
}

.favorite-group > h2 > span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 1px;
  background: #dfa25e;
  transform: rotate(45deg);
}

.favorite-group-list {
  padding: 0 16px;
}

.favorite-group-row {
  position: relative;
  border-bottom: 1px solid #eee9e3;
}

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

.favorite-group-row-main {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #25211e;
  background: transparent;
  text-align: left;
}

.favorite-group-row-main:active {
  background: #fcf8f2;
}

.favorite-group-row-main:disabled {
  color: inherit;
  opacity: 1;
}

.favorite-meridian-name {
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.favorite-meridian-name b,
.favorite-point-fields b,
.favorite-symptom-fields b {
  flex: 0 0 auto;
  color: #403a35;
  font-weight: 500;
}

.favorite-point-image {
  width: 96px;
  height: 108px;
  flex: 0 0 96px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fbf8f2;
}

.favorite-point-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.favorite-point-image.is-placeholder > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #a66b2b;
  background: #f5e8d7;
  font-size: 20px;
}

.favorite-point-fields,
.favorite-symptom-fields {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 4px;
}

.favorite-point-fields > span,
.favorite-symptom-fields > span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  overflow: hidden;
  color: #312c28;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-group-symptoms .favorite-group-row-main {
  min-height: 72px;
}

.favorite-group-row.is-editing .favorite-group-row-main {
  padding-right: 42px;
}

.favorite-group-row .favorite-remove {
  right: 2px;
}

.favorites-screen:not(.recent-screen) .favorites-panel.is-empty {
  min-height: 100%;
}

body.theme-dark .favorites-screen:not(.recent-screen),
body.theme-dark .favorites-tabs,
body.theme-dark .favorites-scroll,
body.theme-dark .favorite-group {
  background: #282520;
}

body.theme-dark .favorites-tabs,
body.theme-dark .favorite-group-row {
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .favorite-group {
  border-top-color: #211f1c;
}

body.theme-dark .favorite-group > h2,
body.theme-dark .favorite-meridian-name,
body.theme-dark .favorite-point-fields > span,
body.theme-dark .favorite-symptom-fields > span {
  color: #f3eee7;
}

body.theme-dark .favorite-meridian-name b,
body.theme-dark .favorite-point-fields b,
body.theme-dark .favorite-symptom-fields b {
  color: #d7cec4;
}

body.theme-dark .favorites-tabs button {
  color: #aaa198;
}

body.theme-dark .favorites-tabs button.is-active {
  color: #f4eee6;
}

body.theme-dark .favorite-group-row-main:active {
  background: rgba(255, 255, 255, 0.04);
}

.favorites-panel.is-empty {
  min-height: calc(100dvh - 126px - env(safe-area-inset-top));
  padding: 0;
  border: 0;
  background: transparent;
}
.favorite-empty-state {
  min-height: inherit;
  padding: 0 0 clamp(64px, 11dvh, 104px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #8f8983;
  text-align: center;
}
.favorite-empty-art {
  position: relative;
  width: 94px;
  height: 62px;
  display: block;
  overflow: hidden;
}
.favorite-empty-art img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 128px;
  height: 128px;
  max-width: none;
  display: block;
  object-fit: contain;
  transform: translate(-50%, -50%);
}
.favorite-empty-state p {
  margin: 4px 0 0;
  color: #6f6963;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: var(--tracking-ui);
}

.confirm-layer { place-items: center; }
.confirm-card {
  width: min(330px, calc(100vw - 48px));
  padding: 23px 20px 18px;
  position: relative;
  z-index: 1;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 22px 50px rgba(45, 32, 24, 0.24);
}
.confirm-card h2 { margin: 0; color: #302a26; font-size: 18px; text-align: center; }
.confirm-card p { margin: 12px 0 18px; color: #7b726a; font-size: 13px; line-height: 1.65; text-align: center; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.confirm-actions button { min-height: 43px; border-radius: 11px; color: #5f5851; background: #f4f1ee; font-size: 14px; }
.confirm-actions .is-danger { color: #fff; background: #b85c52; }

.favorite-clear-confirm-card {
  width: min(324px, calc(100vw - 40px));
  padding: 25px 21px 23px;
  border-radius: 12px;
  text-align: center;
}
.favorite-clear-confirm-mask {
  background: rgba(22, 20, 18, 0.62);
}
.favorite-clear-confirm-card h2 {
  color: #191715;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.favorite-clear-confirm-card p {
  margin: 15px 0 22px;
  color: #77716c;
  font-size: 13px;
  line-height: 1.55;
}
.favorite-clear-confirm-actions {
  gap: 17px;
}
.favorite-clear-confirm-actions button {
  min-height: 46px;
  border-radius: 999px;
  color: #645f5b;
  background: #f4f5f5;
  font-size: 15px;
  font-weight: 500;
}
.favorite-clear-confirm-actions .is-danger {
  color: #fff;
  background: #cf5147;
  font-weight: 600;
}

.favorite-login-layer {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
}
html:has(.favorite-login-layer),
body:has(.favorite-login-layer) { overflow: hidden; }
.favorite-login-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(17, 17, 17, 0.72);
  animation: meMaskIn 160ms ease-out both;
}
.favorite-login-card {
  width: min(306px, calc(100vw - 28px));
  min-height: 186px;
  padding: 23px 20px 21px;
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}
.favorite-login-card:focus { outline: none; }
.favorite-login-card h2 {
  margin: 0;
  color: #171512;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}
.favorite-login-card p {
  margin: 14px -2px 22px;
  color: #76716d;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.65;
  text-align: center;
}
.favorite-login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.favorite-login-actions button {
  min-width: 0;
  min-height: 46px;
  border-radius: 24px;
  color: #716d69;
  background: #f1f2f2;
  font-size: 14px;
  font-weight: 500;
}
.favorite-login-actions .is-primary {
  color: #fff;
  background: #6b4938;
  font-weight: 650;
}
.favorite-login-actions button:active { transform: scale(0.97); }

.about-screen { background: radial-gradient(circle at 16% 10%, rgba(214, 160, 99, 0.12), transparent 34%), #fffdf8; }
.about-brand { padding: 35px 0 27px; display: grid; justify-items: center; gap: 8px; }
.about-brand-mark {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #fffaf3;
  background: linear-gradient(145deg, #d8a15f, #976137);
  box-shadow: 0 13px 30px rgba(137, 86, 43, 0.2);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 37px;
}
.about-brand h2,
.about-brand p { margin: 0; }
.about-brand h2 { color: #312b27; font-size: 20px; }
.about-brand p { color: #968b82; font-size: 12px; }
.about-intro-card,
.settings-detail-card {
  padding: 20px;
  border: 1px solid rgba(226, 215, 202, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}
.about-intro-card p,
.settings-detail-card p { margin: 0; color: #665e57; font-size: 14px; line-height: 1.85; }
.about-intro-card p + p,
.settings-detail-card p + p { margin-top: 14px; }
.about-intro-card > button { margin-top: 18px; color: #9a653a; font-size: 13px; }

.feedback-chat-screen {
  height: calc(100vh - 32px);
  min-height: 0;
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f5f2ed;
}
.feedback-chat-screen .topbar { flex: 0 0 auto; }
.feedback-chat-body { flex: 1; min-height: 0; padding: 6px 2px 18px; overflow-y: auto; }
.feedback-chat-time { margin: 6px 0 18px; color: #a39d97; font-size: 12px; text-align: center; }
.feedback-agent-message,
.feedback-user-message {
  width: fit-content;
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 5px 15px 15px 15px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(61, 49, 39, 0.05);
}
.feedback-agent-message p,
.feedback-user-message p { margin: 0; color: #403a35; font-size: 14px; line-height: 1.65; }
.feedback-agent-message small,
.feedback-user-message small { display: block; margin-top: 7px; color: #99918a; font-size: 10px; }
.feedback-user-messages { margin-top: 16px; display: grid; gap: 12px; justify-items: end; }
.feedback-user-message { border-radius: 15px 5px 15px 15px; background: #e7f1d9; }
.feedback-user-message small { text-align: right; }
.feedback-chat-composer {
  flex: 0 0 auto;
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 9px;
  border-top: 1px solid #e1dcd5;
  background: #faf8f5;
}
.feedback-chat-composer input {
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #ded8d0;
  border-radius: 13px;
  background: #fff;
  font-size: 14px;
}
.feedback-chat-composer > button { width: 44px; height: 44px; border-radius: 13px; color: #fff; background: #a66f42; font-size: 27px; font-weight: 300; }
.feedback-chat-error { grid-column: 1 / -1; margin: 0; color: #b14f47; font-size: 12px; }

.settings-screen .settings-card {
  margin-top: 12px;
  border: 1px solid rgba(226, 215, 202, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}
.settings-screen .settings-row { min-height: 56px; padding: 0 15px; }
.settings-screen .settings-row span { font-size: 15px; font-weight: 600; }
.settings-detail-screen { background: #fffdf8; }
.settings-detail-card { margin-top: 6px; }
.settings-detail-card h2 { margin: 0 0 14px; color: #352f2b; font-size: 17px; }
.settings-detail-list,
.personal-data-list { margin: 0; }
.settings-detail-list > div,
.personal-data-list > div { padding: 13px 0; display: grid; gap: 5px; border-bottom: 1px solid #ebe4dc; }
.settings-detail-list > div:last-child,
.personal-data-list > div:last-child { border-bottom: 0; }
.settings-detail-list dt,
.personal-data-list dt { color: #3e3732; font-size: 14px; font-weight: 700; }
.settings-detail-list dd,
.personal-data-list dd { margin: 0; color: #81776e; font-size: 13px; line-height: 1.6; }
.personal-data-list > div { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.personal-data-card .primary-button,
.settings-detail-card .secondary-button { margin-top: 18px; }

body.theme-dark .me-screen,
body.theme-dark .about-screen,
body.theme-dark .settings-detail-screen { background: var(--surface); }
body.theme-dark .me-service-list,
body.theme-dark .favorites-screen .favorites-panel,
body.theme-dark .about-intro-card,
body.theme-dark .settings-detail-card,
body.theme-dark .settings-screen .settings-card,
body.theme-dark .feedback-agent-message,
body.theme-dark .share-drawer-sheet,
body.theme-dark .confirm-card { border-color: rgba(255, 255, 255, 0.1); background: #202925; }
body.theme-dark .me-identity h1,
body.theme-dark .me-function-group h2,
body.theme-dark .me-service-row-leading strong,
body.theme-dark .favorite-copy strong,
body.theme-dark .about-brand h2,
body.theme-dark .settings-detail-card h2,
body.theme-dark .settings-detail-list dt,
body.theme-dark .personal-data-list dt,
body.theme-dark .feedback-agent-message p,
body.theme-dark .share-drawer-sheet h2,
body.theme-dark .confirm-card h2 { color: #edf2ef; }
body.theme-dark .me-service-row,
body.theme-dark .favorites-screen .favorite-row,
body.theme-dark .settings-detail-list > div,
body.theme-dark .personal-data-list > div { border-color: rgba(255, 255, 255, 0.08); }
body.theme-dark .me-service-row:active,
body.theme-dark .share-channel:active { background: rgba(255, 255, 255, 0.06); }
body.theme-dark .about-intro-card p,
body.theme-dark .settings-detail-card p,
body.theme-dark .settings-detail-list dd,
body.theme-dark .personal-data-list dd,
body.theme-dark .confirm-card p,
body.theme-dark .favorite-copy small { color: rgba(237, 242, 239, 0.68); }

@media (prefers-reduced-motion: reduce) {
  .share-drawer-mask,
  .share-drawer-sheet,
  .confirm-mask { animation: none; }
}
@media (max-width: 350px) {
  .me-service-row { padding: 0 13px; }
  .share-channel span { font-size: 11px; }
}

/* 个人资料：复用“我的”页账号信息，并与吉真倪师资料页保持一致的信息层级。 */
body[data-route="profile"] {
  height: 100vh;
  overflow: hidden;
}

body[data-route="profile"] .phone-shell {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.profile-screen,
body.theme-dark .profile-screen {
  min-height: calc(100vh - 36px);
  padding: 0 14px calc(24px + env(safe-area-inset-bottom));
  background: #f7f4ee;
}

.profile-screen .topbar {
  position: relative;
  z-index: 3;
  min-height: 48px;
  padding: 0 2px;
}

.profile-screen .topbar > .icon-button:first-child {
  margin-left: -9px;
}

.profile-screen .topbar-title h1 {
  color: #332e2a;
  font-size: 15px;
  font-weight: 650;
}

.profile-hero {
  position: relative;
  height: 72px;
  margin: 0 -14px;
}

.profile-avatar {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -28px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 5px solid #fff;
  border-radius: 50%;
  color: #8e857b;
  background: #f3efe8;
  box-shadow: 0 5px 18px rgba(89, 72, 55, 0.1);
  transform: translateX(-50%);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}

.profile-info-card {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 156px);
  margin: 0 -14px;
  padding: 34px 15px 0;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  background: #fff;
}

.profile-info-row {
  width: 100%;
  min-height: 52px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #eeeae5;
  background: transparent;
  text-align: left;
}

button.profile-info-row:active {
  background: #fbf7f1;
}

.profile-info-label {
  flex: 0 0 auto;
  color: #8f8983;
  font-size: 14px;
  font-weight: 400;
}

.profile-info-trailing {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  color: #312c28;
}

.profile-info-trailing strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-info-chevron {
  flex: 0 0 auto;
  color: #9b958f;
  font-size: 21px;
  font-weight: 300;
  line-height: 1;
}

body.theme-dark .profile-screen,
body.theme-dark .profile-hero {
  background: #211f1c;
}

body.theme-dark .profile-info-card {
  background: #2b2824;
}

body.theme-dark .profile-avatar {
  border-color: #2b2824;
  background: #39342e;
  color: #c9bba9;
}

body.theme-dark .profile-screen .topbar-title h1,
body.theme-dark .profile-info-trailing {
  color: #f4eee6;
}

body.theme-dark .profile-info-row {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .profile-info-label {
  color: #aaa197;
}

body.theme-dark button.profile-info-row:active {
  background: rgba(255, 255, 255, 0.04);
}

/* 设置与合规页面：同步吉真中药 MVP 的分组、权限说明、清单表格与政策正文。 */
body[data-route="settings"],
body[data-route="settings"] .phone-shell,
body[data-route="settings-detail"],
body[data-route="settings-detail"] .phone-shell,
body[data-route="legal"],
body[data-route="legal"] .phone-shell {
  scrollbar-width: none;
}
body[data-route="settings"],
body[data-route="settings-detail"],
body[data-route="legal"] {
  height: 100vh;
  overflow: hidden;
}
body[data-route="settings"] .statusbar,
body[data-route="settings-detail"] .statusbar,
body[data-route="legal"] .statusbar { display: none; }
body[data-route="settings"] .phone-shell,
body[data-route="settings-detail"] .phone-shell,
body[data-route="legal"] .phone-shell {
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
}
body[data-route="settings"]::-webkit-scrollbar,
body[data-route="settings"] .phone-shell::-webkit-scrollbar,
body[data-route="settings-detail"]::-webkit-scrollbar,
body[data-route="settings-detail"] .phone-shell::-webkit-scrollbar,
body[data-route="legal"]::-webkit-scrollbar,
body[data-route="legal"] .phone-shell::-webkit-scrollbar {
  display: none;
}
.settings-screen,
body.theme-dark .settings-screen {
  padding-right: 6px;
  padding-top: 0;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  background: #f7f4ee;
}

.settings-screen .topbar {
  min-height: 46px;
  padding: 0;
}
.settings-screen .topbar > .icon-button:first-child { margin-left: -14px; }
.settings-screen .topbar-title h1 {
  font-size: 14px;
  font-weight: 600;
}
.settings-screen .settings-card:first-of-type { margin-top: 0; }
.settings-screen .settings-card + .settings-card { margin-top: 14px; }
.settings-screen .settings-card,
body.theme-dark .settings-screen .settings-card {
  border: 0;
  border-radius: 14px;
  background: #fff;
}
.settings-screen .settings-row {
  position: relative;
  min-height: 50px;
  padding: 0 13px;
  border-bottom: 0;
  background: #fff;
}
.settings-screen .settings-row:not(:last-child)::after {
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 13px;
  height: 1px;
  background: #f1f1f1;
  content: "";
}
.settings-screen .settings-logout,
body.theme-dark .settings-screen .settings-logout {
  width: 100%;
  min-height: 48px;
  margin-top: 14px;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: #222;
  font-size: 14px;
  font-weight: 400;
}
.settings-screen .settings-logout:active { background: #f4f4f4; }
.settings-screen .settings-row span,
body.theme-dark .settings-screen .settings-row span {
  color: #222;
  font-size: 14px;
  font-weight: 400;
}
.settings-screen .settings-row small,
body.theme-dark .settings-screen .settings-row small {
  color: #b4b4b4;
  font-size: 14px;
  font-weight: 400;
}
.settings-screen .settings-row-trailing {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.settings-screen .settings-row-trailing b,
.settings-screen .settings-row-trailing i {
  font-style: normal;
  font-weight: 400;
}
.settings-screen .settings-row-trailing b { font-size: 11px; }
.settings-screen .settings-row-trailing i { font-size: 17px; line-height: 1; }
.settings-screen .settings-row.is-muted,
.settings-screen .settings-row.is-muted span,
.settings-screen .settings-row.is-muted small { color: #a8a8a8; opacity: 1; }

.legal-screen:not(.settings-detail-screen),
body.theme-dark .legal-screen:not(.settings-detail-screen) {
  padding-top: 0;
  padding-right: 6px;
  background: #f7f4ee;
}
.legal-screen:not(.settings-detail-screen) .topbar {
  min-height: 46px;
  padding: 0;
}
.legal-screen:not(.settings-detail-screen) .topbar > .icon-button:first-child { margin-left: -14px; }
.legal-screen:not(.settings-detail-screen) .topbar-title h1,
body.theme-dark .legal-screen:not(.settings-detail-screen) .topbar-title h1 {
  font-size: 14px;
  font-weight: 600;
}

.personal-data-export { padding: 6px 6px 0 16px; }
.personal-data-export-intro,
.personal-data-export-note { margin: 0; color: #81776e; font-size: 13px; line-height: 1.65; }
.personal-data-export-card { margin: 14px 0 0; overflow: hidden; border: 1px solid #eee6dc; border-radius: 14px; background: #fff; }
.personal-data-export-card > div { min-height: 50px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eee9e2; }
.personal-data-export-card > div:last-child { border-bottom: 0; }
.personal-data-export-card dt { color: #2e2925; font-size: 14px; }
.personal-data-export-card dd { margin: 0; color: #8b8179; font-size: 13px; }
.personal-data-export-button { width: 100%; min-height: 48px; margin-top: 16px; border-radius: 24px; color: #fff; background: #76503e; font-size: 14px; font-weight: 600; }
.personal-data-export-note { margin-top: 10px; text-align: center; font-size: 12px; }

.settings-detail-screen,
.settings-detail-screen.legal-screen,
body.theme-dark .settings-detail-screen,
body.theme-dark .settings-detail-screen.legal-screen {
  padding-right: 0;
  padding-left: 0;
  color: #28231f;
  background: #f7f4ee;
}
.settings-detail-screen .topbar,
.settings-detail-screen.legal-screen .topbar {
  width: calc(100% - 22px);
  min-height: 46px;
  margin-right: 6px;
  margin-left: 16px;
  padding: 0;
  border-bottom: 0;
  background: #f7f4ee;
}
.settings-detail-screen .topbar > .icon-button:first-child { margin-left: -14px; }
.settings-detail-screen .topbar-title h1,
body.theme-dark .settings-detail-screen .topbar-title h1 {
  color: #201c19;
  font-size: 14px;
  font-weight: 600;
}

.settings-detail-screen .legal-detail {
  min-height: calc(100dvh - 112px - env(safe-area-inset-top));
  margin: 0;
  padding: 22px 20px 56px;
  color: #39322d;
  background: #fff;
}
.settings-detail-screen .legal-detail p,
body.theme-dark .settings-detail-screen .legal-detail p {
  margin: 0;
  color: #4b443e;
  font-size: 14px;
  line-height: 1.85;
}
.settings-detail-screen .legal-detail p + p { margin-top: 12px; }
.settings-detail-screen .legal-meta {
  margin: 2px 0 16px;
  color: #91877d;
  font-size: 12px;
}
.settings-detail-screen .legal-warning {
  margin: 0 0 18px;
  padding: 14px 15px;
  border-radius: 12px;
  background: #f7f0e4;
}
.settings-detail-screen .legal-warning p,
body.theme-dark .settings-detail-screen .legal-warning p {
  color: #604d3f;
  font-weight: 600;
  line-height: 1.75;
}
.settings-detail-screen .legal-section-title {
  margin: 28px 0 12px;
  color: #2d2723;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
}
.settings-detail-screen .legal-subsection-title {
  margin: 22px 0 9px;
  color: #40372f;
  font-size: 17px;
}
.settings-detail-screen .legal-label { margin-top: 18px; color: #40372f; font-weight: 700; }
.settings-detail-screen .legal-detail a { color: #ad682c; text-underline-offset: 3px; }

.personal-info-period-control { position: relative; justify-self: end; }
.personal-info-period-trigger {
  min-width: 78px;
  min-height: 34px;
  padding: 0 9px 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #ddd5ca;
  border-radius: 8px;
  color: #4f4943;
  background: #fff;
  font-size: 12px;
}
.personal-info-period-trigger i { font-size: 13px; font-style: normal; transition: transform 160ms ease; }
.personal-info-period-trigger[aria-expanded="true"] i { transform: rotate(180deg); }
.personal-info-period-menu {
  position: absolute;
  z-index: 96;
  top: calc(100% + 7px);
  right: 0;
  width: 112px;
  padding: 5px;
  overflow: hidden;
  border: 1px solid #e1d8cc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(55, 43, 34, 0.15);
}
.personal-info-period-menu button {
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  border-radius: 7px;
  color: #5c554e;
  background: transparent;
  font-size: 12px;
  text-align: left;
}
.personal-info-period-menu button.is-selected { color: #8a552d; background: #f7eee2; font-weight: 600; }

.personal-info-table-wrap,
.legal-table-wrap { margin: 16px 0 22px; overflow-x: auto; border: 1px solid #ded9d2; background: #fff; }
.legal-table { width: 100%; border-collapse: collapse; color: #2f2b27; font-size: 13px; line-height: 1.55; }
.legal-table th,
.legal-table td { padding: 10px; border-right: 1px solid #ded9d2; border-bottom: 1px solid #ded9d2; text-align: left; vertical-align: top; }
.legal-table th { color: #25211e; background: #f8f4ec; font-weight: 600; }
.legal-table th:last-child,
.legal-table td:last-child { border-right: 0; }
.legal-table tbody tr:last-child td { border-bottom: 0; }

.personal-information-list-screen .legal-detail { padding-right: 14px; padding-left: 14px; }
.personal-information-list-screen .personal-info-table-wrap { overflow: hidden; border-radius: 9px; }
.personal-information-list-screen .personal-info-table { table-layout: fixed; font-size: 11px; line-height: 1.42; }
.personal-information-list-screen .personal-info-table th,
.personal-information-list-screen .personal-info-table td {
  padding: 8px 3px;
  text-align: center;
  vertical-align: middle;
  word-break: break-all;
}
.personal-information-list-screen .personal-info-table th:nth-child(1),
.personal-information-list-screen .personal-info-table td:nth-child(1) { width: 10%; writing-mode: vertical-rl; letter-spacing: 1px; }
.personal-information-list-screen .personal-info-table th:nth-child(2),
.personal-information-list-screen .personal-info-table td:nth-child(2) { width: 18%; }
.personal-information-list-screen .personal-info-table th:nth-child(3),
.personal-information-list-screen .personal-info-table td:nth-child(3) { width: 19%; }
.personal-information-list-screen .personal-info-table th:nth-child(4),
.personal-information-list-screen .personal-info-table td:nth-child(4) { width: 18%; }
.personal-information-list-screen .personal-info-table th:nth-child(5),
.personal-information-list-screen .personal-info-table td:nth-child(5) { width: 16%; }
.personal-information-list-screen .personal-info-table th:nth-child(6),
.personal-information-list-screen .personal-info-table td:nth-child(6) { width: 19%; }

.legal-record {
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid #e7ddd0;
  border-radius: 10px;
  background: #fffdf8;
}
.legal-record-title { margin: 0; padding: 13px 14px; border-bottom: 1px solid #e7ddd0; color: #28231f; background: #f7f0e5; font-size: 16px; }
.legal-record-fields { margin: 0; }
.legal-record-field { padding: 10px 12px; display: grid; grid-template-columns: minmax(92px, 30%) minmax(0, 1fr); gap: 12px; border-bottom: 1px solid #eee6dc; font-size: 13px; line-height: 1.65; }
.legal-record-field:last-child { border-bottom: 0; }
.legal-record-field dt { color: #5a4d43; font-weight: 600; }
.legal-record-field dd { margin: 0; color: #332e2a; overflow-wrap: anywhere; }

.privacy-summary-screen .privacy-summary-table-wrap { overflow-x: auto; border-radius: 0; }
.privacy-summary-screen .privacy-summary-table { width: 720px; table-layout: fixed; }
.privacy-summary-screen .privacy-summary-table th,
.privacy-summary-screen .privacy-summary-table td { min-width: 150px; }

.settings-permissions { min-height: calc(100dvh - 112px); padding: 18px 20px 48px; background: #fff; }
.settings-permission-intro { margin: 0 0 14px; color: #302b27; font-size: 14px; line-height: 1.65; }
.settings-permission-card { overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px #eee8df; }
.settings-permission-row { width: 100%; min-height: 78px; padding: 15px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; border-bottom: 1px solid #eee9e2; border-radius: 0; color: #292520; background: #fff; text-align: left; }
.settings-permission-row:last-child { border-bottom: 0; }
.settings-permission-copy { display: grid; gap: 6px; }
.settings-permission-copy strong { color: #292520; font-size: 15px; font-weight: 500; }
.settings-permission-copy small { color: #8c857e; font-size: 11px; line-height: 1.45; }
.settings-permission-action { display: inline-flex; align-items: center; gap: 4px; color: #77716c; font-size: 13px; white-space: nowrap; }
.settings-permission-action i { font-style: normal; font-size: 18px; line-height: 1; }
.settings-permission-toast { position: fixed; z-index: 190; top: var(--toast-top); left: 50%; width: max-content; max-width: calc(100vw - 40px); padding: 10px 16px; transform: translateX(-50%); border-radius: 999px; color: #fff; background: rgba(48, 42, 38, 0.94); font-size: 13px; box-shadow: 0 8px 22px rgba(34, 29, 26, 0.22); }

.settings-detail-empty { min-height: calc(100dvh - 112px); display: grid; place-items: center; color: #746c64; background: #fff; }
.privacy-consent-withdrawal-card p span { display: block; }
.privacy-consent-withdrawal-card .is-danger { background: #b85849; }

/* 启动页：首屏可用后立即淡出，不设置广告、倒计时或强制停留。 */
.startup-screen {
  position: fixed;
  z-index: 220;
  top: calc(32px + env(safe-area-inset-top));
  bottom: 0;
  left: 50%;
  width: min(430px, 100vw);
  overflow: hidden;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 42%, rgba(213, 164, 99, 0.08), transparent 34%),
    #fbf8f2;
  opacity: 1;
  transition: opacity 180ms ease-out;
}

.startup-screen.is-exiting {
  pointer-events: none;
  opacity: 0;
}

.startup-screen-copy {
  position: absolute;
  top: 45%;
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 14px;
  transform: translate(-50%, -50%);
}

.startup-screen-copy p {
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  color: #292622;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.38em;
}

.startup-screen-marker {
  width: 8px;
  height: 8px;
  display: block;
  transform: rotate(45deg);
  border-radius: 2px;
  background: linear-gradient(135deg, #e8b468, #b77a3c);
  box-shadow: 0 2px 6px rgba(156, 99, 45, 0.16);
}

.startup-screen-brand {
  position: absolute;
  right: 0;
  bottom: calc(70px + env(safe-area-inset-bottom));
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.startup-screen-brand-mark {
  flex: 0 0 62px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fffaf2;
  background: linear-gradient(145deg, #dda55e, #a96733);
  box-shadow: 0 10px 24px rgba(129, 79, 39, 0.18);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 31px;
  line-height: 1;
}

.startup-screen-brand > div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.startup-screen-brand strong,
.startup-screen-brand > div > span {
  display: block;
  white-space: nowrap;
}

.startup-screen-brand strong {
  color: #27231f;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.startup-screen-brand > div > span {
  color: #7e7871;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.1em;
}

@media (max-height: 680px) {
  .startup-screen-copy { top: 42%; gap: 10px; }
  .startup-screen-copy p { font-size: 22px; }
  .startup-screen-brand { bottom: calc(46px + env(safe-area-inset-bottom)); }
}

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

/* 首次启动：同步吉真中药 MVP 的个人信息保护指引。 */
.privacy-consent-guide-layer {
  position: fixed;
  z-index: 218;
  inset: 0;
  width: min(100vw, 430px);
  margin: 0 auto;
  padding: 8px;
  display: grid;
  place-items: center;
}

.privacy-consent-guide-mask {
  position: absolute;
  inset: 0;
  background: rgba(35, 35, 33, 0.58);
}

.privacy-consent-guide-card {
  position: relative;
  z-index: 1;
  width: min(100%, 394px);
  max-height: calc(100dvh - 16px);
  padding: 24px 22px 22px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 54px rgba(22, 19, 16, 0.24);
}

.privacy-consent-guide-card:focus { outline: none; }

.privacy-consent-guide-card h2 {
  margin: 0 0 16px;
  color: #282522;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.3;
  text-align: center;
}

.privacy-consent-guide-content {
  min-height: 0;
  padding: 0 2px 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  color: #696561;
  font-size: 14px;
  line-height: 1.78;
  -webkit-overflow-scrolling: touch;
}

.privacy-consent-guide-content::-webkit-scrollbar { display: none; width: 0; height: 0; }
.privacy-consent-guide-content p { margin: 0 0 12px; }
.privacy-consent-guide-content ol { margin: 0 0 12px; padding-left: 1.9em; }
.privacy-consent-guide-content li { margin: 0 0 7px; padding-left: 2px; }

.privacy-consent-guide-link,
body.theme-dark .privacy-consent-guide-link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  color: #b67832;
  background: transparent;
  font: inherit;
  line-height: inherit;
  text-align: left;
  vertical-align: baseline;
}

.privacy-consent-guide-link:focus-visible {
  outline: 2px solid rgba(182, 120, 50, 0.36);
  outline-offset: 2px;
  border-radius: 3px;
}

.privacy-consent-guide-actions {
  padding-top: 16px;
  display: grid;
  gap: 14px;
  background: #fff;
}

.privacy-consent-guide-actions button {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
}

.privacy-consent-guide-actions .is-primary { color: #fff; background: #6b4938; }
.privacy-consent-guide-actions .is-secondary { color: #77736f; background: #f1f2f2; }

html:has(.privacy-consent-guide-layer),
body:has(.privacy-consent-guide-layer) { overflow: hidden; }

/* 不同意后的简版：仅提供不可下钻的常用穴位列表。 */
.phone-shell:has(.limited-home-screen),
.phone-shell:has(.limited-home-screen) .statusbar { background: #faf6ed; }

.phone-shell:has(.limited-home-screen) { height: 100dvh; min-height: 0; overflow: hidden; }

.screen.no-tabbar.limited-home-screen,
body.theme-dark .screen.no-tabbar.limited-home-screen {
  height: calc(100dvh - 32px - env(safe-area-inset-top));
  min-height: 0;
  padding: 0 0 calc(96px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr);
  overflow: hidden;
  background: radial-gradient(circle at 88% 7%, rgba(231, 174, 129, 0.18), transparent 19%), linear-gradient(180deg, #faf6ed 0, #fffdf9 24%, #fffdf9 100%);
}

.limited-home-header { min-height: 70px; display: grid; place-items: center; }
.limited-home-header h1 { margin: 0; color: #2e241f; font-size: 22px; font-weight: 700; letter-spacing: 0.04em; }

.limited-home-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
}

.limited-home-panel-head {
  min-height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(229, 216, 198, 0.48);
}

.limited-home-panel-head h2 {
  position: relative;
  margin: 0;
  padding-left: 10px;
  color: #342820;
  font-size: 17px;
  font-weight: 700;
}

.limited-home-panel-head h2::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 4px;
  height: 17px;
  border-radius: 4px;
  background: #bd833f;
  transform: translateY(-50%);
}

.limited-home-list {
  min-height: 0;
  padding: 0 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.limited-home-list::-webkit-scrollbar { display: none; width: 0; height: 0; }
.limited-home-list:focus { outline: none; }
.limited-home-list:focus-visible { box-shadow: inset 0 0 0 2px rgba(189, 131, 63, 0.42); }

.limited-home-point {
  min-height: 94px;
  padding: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  border-bottom: 1px solid #eee5d8;
}

.limited-home-point-image {
  width: 68px;
  height: 68px;
  margin-top: 13px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(232, 225, 216, 0.72);
  border-radius: 6px;
  color: #a66f32;
  background: #f5ead7;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 25px;
}

.limited-home-point-image img { width: 100%; height: 100%; display: block; object-fit: contain; background: #fbf7f0; }
.limited-home-point-copy { min-width: 0; padding: 16px 0; display: grid; gap: 8px; }
.limited-home-point-copy > span { min-width: 0; display: flex; align-items: baseline; flex-wrap: nowrap; gap: 9px; overflow: hidden; }
.limited-home-point-copy strong { flex: 0 0 auto; max-width: 42%; overflow: hidden; color: #1e0d00; font-size: 18px; line-height: 1.3; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.limited-home-point-copy small { min-width: 0; overflow: hidden; color: var(--subtle); font-size: 14px; line-height: 1.4; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.limited-home-point-copy em { min-width: 0; overflow: hidden; color: var(--muted); font-size: 16px; font-style: normal; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; }

.limited-home-upgrade {
  position: fixed;
  z-index: 28;
  left: 50%;
  bottom: 0;
  width: min(430px, 100vw);
  min-height: calc(82px + env(safe-area-inset-bottom));
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: grid;
  align-items: center;
  border-top: 1px solid rgba(228, 216, 199, 0.62);
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 -10px 26px rgba(76, 54, 36, 0.1);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.limited-home-upgrade button { min-height: 52px; border-radius: 999px; color: #fff; background: #6b4938; font-size: 16px; font-weight: 600; letter-spacing: 0.02em; }
.limited-home-upgrade button:active { opacity: 0.72; }

@media (max-height: 700px) {
  .privacy-consent-guide-card { padding-top: 18px; padding-bottom: 16px; }
  .privacy-consent-guide-card h2 { margin-bottom: 12px; font-size: 21px; }
  .privacy-consent-guide-content { font-size: 13px; line-height: 1.68; }
  .privacy-consent-guide-actions { gap: 10px; padding-top: 12px; }
  .privacy-consent-guide-actions button { min-height: 46px; }
}

/* 关于我们：完整同步吉真中药 MVP 的品牌区、装饰背景与底部政策入口。 */
.about-screen,
body.theme-dark .about-screen {
  position: relative;
  min-height: calc(100dvh - 32px);
  padding: 0 16px calc(12px + env(safe-area-inset-bottom));
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(248, 243, 234, 0.78) 0 172px, rgba(250, 247, 241, 0.98) 252px),
    url("./assets/ui/detail-top-corner-v1.png") top center / 100% auto no-repeat;
}

.about-screen::before,
.about-screen::after {
  content: "";
  position: absolute;
  z-index: 0;
  border: 1px solid rgba(190, 151, 94, 0.12);
  border-radius: 999px;
  pointer-events: none;
}

.about-screen::before {
  top: 43px;
  left: 24px;
  width: 76px;
  height: 13px;
}

.about-screen::after {
  top: 96px;
  right: -22px;
  width: 116px;
  height: 16px;
}

.about-screen > * {
  position: relative;
  z-index: 1;
}

.about-screen .topbar {
  min-height: 52px;
  padding-bottom: 8px;
}

.about-screen .icon-button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.about-screen .about-brand {
  min-height: 118px;
  padding: 5px 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  text-align: center;
}

.about-screen .about-brand-mark,
body.theme-dark .about-screen .about-brand-mark {
  width: 76px;
  height: 76px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 20px;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background: #171717;
  box-shadow: 0 10px 24px rgba(61, 46, 33, 0.15);
}

.about-brand-main {
  display: grid;
  place-items: center;
  padding-top: 4px;
  color: #fff;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
}

.about-brand-foot {
  display: grid;
  place-items: center;
  border-top: 1px solid #c99149;
  color: #30261f;
  background: linear-gradient(180deg, #fbf1df, #f2e2c7);
  font-family: "STSong", "Songti SC", serif;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
}

.about-screen .about-brand > p,
body.theme-dark .about-screen .about-brand > p {
  margin: 10px 0 0;
  color: #2f2925;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}

.about-screen .about-intro-card,
body.theme-dark .about-screen .about-intro-card {
  min-height: calc(100dvh - 230px - env(safe-area-inset-bottom));
  padding: 18px 17px 17px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(238, 229, 217, 0.72);
  border-radius: 20px;
  color: #332d28;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 34px rgba(89, 68, 47, 0.045);
}

.about-screen .about-intro-copy,
body.theme-dark .about-screen .about-intro-copy {
  margin: 0;
  color: #332d28;
  font-size: 14px;
  line-height: 1.82;
  text-align: justify;
}

.about-screen .about-intro-copy p,
body.theme-dark .about-screen .about-intro-copy p {
  margin: 0;
  color: #332d28;
  font-size: inherit;
  line-height: inherit;
}

.about-screen .about-intro-copy p + p { margin-top: 14px; }

.about-policy-links {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.about-policy-links button,
body.theme-dark .about-policy-links button {
  min-height: 38px;
  padding: 0;
  color: #b56f28;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}

.about-policy-links button:active { color: #8d5420; }
.about-policy-links button:focus-visible {
  outline: 2px solid rgba(181, 111, 40, 0.35);
  outline-offset: 4px;
  border-radius: 4px;
}
