:root {
  color-scheme: light;
  --page: #edf6f7;
  --surface: #ffffff;
  --surface-soft: #f7fbfb;
  --ink: #132b3a;
  --muted: #5b7180;
  --subtle: #8a96a3;
  --line: #d7e6e8;
  --line-strong: #bed3da;
  --primary: #0c7d88;
  --primary-deep: #095d68;
  --primary-soft: #e6f6f4;
  --blue: #2377bd;
  --green: #1f9a75;
  --amber: #b36b18;
  --danger: #b94154;
  --shadow: 0 14px 34px rgba(29, 54, 72, 0.08);
}

@keyframes softFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes companionPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.03);
  }
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1) rotate(-12deg);
  }
  50% {
    transform: scale(1.18) rotate(-12deg);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "HarmonyOS Sans SC", "PingFang SC", "MiSans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.client-shell {
  position: relative;
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px calc(88px + env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 16% -8%, rgba(12, 125, 136, 0.1), transparent 30%),
    radial-gradient(circle at 92% 16%, rgba(255, 190, 92, 0.12), transparent 27%),
    linear-gradient(180deg, #fbfefe 0%, #eef7f6 48%, #f7faf8 100%);
}

.client-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -14px -14px 14px;
  padding: max(13px, env(safe-area-inset-top)) 14px 11px;
  border-bottom: 1px solid rgba(219, 228, 231, 0.88);
  background: rgba(251, 253, 252, 0.92);
  backdrop-filter: blur(14px);
}

.client-topbar h1 {
  margin: 3px 0 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.eyebrow,
.service-tag {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.topbar-link {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--primary-deep);
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
}

.mini-topbar {
  display: grid;
  grid-template-columns: 40px 1fr 74px;
  align-items: center;
  margin-bottom: 0;
  background: rgba(255, 255, 255, 0.94);
}

.mini-topbar h1 {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
}

.mini-back,
.mini-menu {
  border: 0;
  background: transparent;
}

.mini-back {
  width: 36px;
  height: 36px;
  color: #17212b;
  font-size: 31px;
  line-height: 1;
}

.mini-menu {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.mini-menu span {
  width: 20px;
  height: 20px;
  border: 1px solid #c9d7df;
  border-radius: 50%;
  background: #fff;
}

.mini-location-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 10px 0 12px;
}

.location-pill,
.score-pill {
  display: inline-flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(35, 111, 160, 0.2);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.9);
  color: #183244;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(53, 93, 120, 0.08);
}

.location-pill strong,
.score-pill strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-pill {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, #1b8bd7, #5b68f0);
}

.weather-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr 28px;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  margin: 0 0 9px;
  overflow: hidden;
  border: 1px solid rgba(196, 216, 217, 0.9);
  border-radius: 8px;
  padding: 8px 9px;
  background:
    radial-gradient(circle at 92% 15%, rgba(255, 198, 101, 0.32), transparent 28%),
    linear-gradient(135deg, #f0fbf8 0%, #f7fbff 58%, #fff8eb 100%);
  box-shadow: 0 12px 28px rgba(29, 54, 72, 0.07);
}

.weather-card::before {
  content: "";
  position: absolute;
  inset: auto -34px -44px auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(15, 111, 120, 0.08);
}

.weather-visual {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, #74c8ff, #2d8fe6);
  box-shadow: inset 0 -10px 18px rgba(15, 82, 126, 0.16);
}

.weather-visual span,
.weather-visual i,
.weather-visual::before,
.weather-visual::after {
  content: "";
  position: absolute;
  display: block;
}

.weather-visual span {
  right: 5px;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffd36b;
}

.weather-visual i {
  left: 6px;
  bottom: 7px;
  width: 25px;
  height: 12px;
  border-radius: 999px;
  background: #fff;
}

.weather-visual::before {
  left: 12px;
  bottom: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

.weather-visual.weather-rain {
  background: linear-gradient(135deg, #7fb5d8, #556b97);
}

.weather-visual.weather-rain::after {
  left: 15px;
  bottom: 4px;
  width: 4px;
  height: 10px;
  border-radius: 999px;
  background: #b9e6ff;
  box-shadow: 12px 2px 0 #b9e6ff, 24px -1px 0 #b9e6ff;
}

.weather-visual.weather-cloud {
  background: linear-gradient(135deg, #a9c8de, #6c92b6);
}

.weather-visual.weather-fog {
  background: linear-gradient(135deg, #b9c9ce, #8ba1a8);
}

.weather-visual.weather-snow {
  background: linear-gradient(135deg, #acd8ff, #7ea6d9);
}

.weather-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.weather-copy span {
  display: block;
  margin-bottom: 2px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.weather-copy strong {
  display: block;
  overflow: hidden;
  color: #13283a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.weather-refresh {
  position: relative;
  z-index: 1;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(15, 111, 120, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
}

.weather-refresh::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 2px solid var(--primary);
  border-left-color: transparent;
  border-radius: 50%;
}

.weather-refresh::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 6px;
  border: 4px solid transparent;
  border-left-color: var(--primary);
  transform: rotate(-20deg);
}

.weather-card.loading .weather-visual {
  animation: softFloat 1.8s ease-in-out infinite;
}

.policy-carousel {
  position: relative;
  overflow: hidden;
  min-height: 224px;
  margin-bottom: 8px;
  border-radius: 8px 8px 0 0;
  background: #dff4f6;
  touch-action: pan-y;
  user-select: none;
  box-shadow: 0 16px 34px rgba(31, 113, 128, 0.1);
}

.policy-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  align-items: center;
  gap: 6px;
  padding: 16px 14px 34px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.policy-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide-blue {
  background:
    radial-gradient(circle at 86% 20%, rgba(255, 255, 255, 0.62), transparent 23%),
    linear-gradient(135deg, #42a7f6, #7bd8df 55%, #e9fbf6);
}

.slide-green {
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.62), transparent 24%),
    linear-gradient(135deg, #61c7a7, #c9f0df 54%, #fff8ed);
}

.slide-violet {
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.7), transparent 26%),
    linear-gradient(135deg, #6da4ff, #d8e8ff 55%, #fff7ec);
}

.slide-copy {
  position: relative;
  z-index: 2;
  color: #fff;
}

.slide-copy span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.slide-copy h2 {
  margin: 7px 0 6px;
  max-width: 8.2em;
  font-size: 24px;
  line-height: 1.12;
  color: #fff;
  text-shadow: 0 3px 12px rgba(16, 76, 126, 0.2);
}

.slide-copy p {
  margin: 0;
  max-width: 17.6em;
  color: rgba(255, 255, 255, 0.92);
  font-size: 12px;
  line-height: 1.42;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.slide-action {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0 13px;
  color: #1261a3;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(34, 94, 132, 0.18);
  transform: translateY(0);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.slide-action:active,
.quick-entry-panel button:active,
.policy-mini-card:active,
.primary-action:active,
.secondary-action:active,
.ghost-action:active {
  transform: translateY(1px) scale(0.99);
}

.family-graphic,
.mom-card-graphic,
.care-graphic {
  position: relative;
  z-index: 1;
  min-height: 136px;
  filter: drop-shadow(0 15px 20px rgba(22, 73, 98, 0.12));
}

.family-graphic .home-shape {
  position: absolute;
  right: 4px;
  bottom: 9px;
  width: 96px;
  height: 76px;
  border-radius: 16px 16px 8px 8px;
  background: rgba(255, 255, 255, 0.78);
}

.family-graphic .home-shape::before {
  content: "";
  position: absolute;
  left: 16px;
  top: -28px;
  width: 70px;
  height: 70px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  transform: rotate(45deg);
}

.family-graphic .home-shape::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 13px;
  width: 40px;
  height: 22px;
  border-radius: 999px 999px 6px 6px;
  color: #256c9e;
  background:
    radial-gradient(circle at 30% 40%, #256c9e 0 3px, transparent 4px),
    radial-gradient(circle at 70% 40%, #256c9e 0 3px, transparent 4px),
    linear-gradient(#fff 0 0);
}

.family-graphic .mom,
.family-graphic .dad,
.family-graphic .baby {
  position: absolute;
  border-radius: 999px 999px 12px 12px;
  background: #fff;
}

.family-graphic .mom {
  right: 82px;
  bottom: 17px;
  width: 36px;
  height: 86px;
  background: linear-gradient(#ffe5b7 0 38%, #fff 38% 70%, #2f92df 70%);
}

.family-graphic .dad {
  right: 45px;
  bottom: 17px;
  width: 38px;
  height: 96px;
  background: linear-gradient(#ffe2ad 0 38%, #fff 38% 70%, #ff7478 70%);
}

.family-graphic .baby {
  right: 26px;
  bottom: 17px;
  width: 32px;
  height: 64px;
  background: linear-gradient(#ffe1ad 0 45%, #fff 45% 72%, #25bd9a 72%);
}

.mom-card-graphic .circle-one,
.mom-card-graphic .circle-two,
.mom-card-graphic .book-card,
.care-graphic .coin,
.care-graphic .shield,
.care-graphic .heart {
  position: absolute;
  display: block;
}

.mom-card-graphic .circle-one {
  right: 22px;
  top: 18px;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
}

.mom-card-graphic .circle-two {
  right: 70px;
  top: 56px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(255, 201, 137, 0.65);
}

.mom-card-graphic .book-card {
  right: 30px;
  bottom: 20px;
  width: 96px;
  height: 76px;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 -22px #32b48a;
}

.mom-card-graphic .book-card::before {
  content: "";
  position: absolute;
  left: 24px;
  top: 18px;
  width: 48px;
  height: 30px;
  border: 4px solid #1a806c;
  border-top: 0;
  border-radius: 0 0 14px 14px;
  color: #1a806c;
  background: linear-gradient(90deg, transparent 47%, #1a806c 48% 52%, transparent 53%);
}

.care-graphic .coin {
  right: 52px;
  top: 16px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe17d, #ffac3d);
  box-shadow: inset 0 0 0 9px rgba(255, 255, 255, 0.38);
}

.care-graphic .shield {
  right: 18px;
  bottom: 22px;
  width: 92px;
  height: 98px;
  border-radius: 34px 34px 48px 48px;
  background: rgba(255, 255, 255, 0.78);
}

.care-graphic .shield::after {
  content: "+";
  position: absolute;
  inset: 23px 0 auto;
  color: #6476e9;
  text-align: center;
  font-size: 44px;
  font-weight: 900;
}

.care-graphic .heart {
  right: 92px;
  bottom: 27px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #ff7b8f;
  transform: rotate(45deg);
}

.carousel-dots {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 8;
  display: flex;
  gap: 7px;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
}

.carousel-dots button.active {
  width: 20px;
  background: #fff;
}

.quick-entry-panel {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 12px 12px;
  padding: 11px 9px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(38, 74, 104, 0.14);
}

.quick-entry-panel button {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 56px;
  border: 0;
  background: transparent;
  color: #1c3143;
  font-size: 13px;
  font-weight: 900;
  border-radius: 8px;
  transition: background 0.16s ease, transform 0.16s ease;
}

.quick-entry-panel button:active {
  background: #f2faf8;
}

.entry-visual,
.entry-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.entry-visual {
  position: relative;
}

.entry-visual i,
.entry-visual::before,
.entry-visual::after {
  content: "";
  position: absolute;
  display: block;
}

.entry-book {
  background: linear-gradient(135deg, #14c5a6, #0fae92);
}

.entry-book::before {
  width: 17px;
  height: 22px;
  border: 3px solid #fff;
  border-radius: 4px;
}

.entry-book i {
  width: 9px;
  height: 3px;
  margin-top: -3px;
  background: #fff;
  box-shadow: 0 7px #fff;
}

.entry-check {
  background: linear-gradient(135deg, #8d66f2, #6a56db);
}

.entry-check::before {
  width: 21px;
  height: 21px;
  border: 3px solid #fff;
  border-radius: 50%;
}

.entry-check i {
  width: 14px;
  height: 7px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
}

.entry-learn {
  background: linear-gradient(135deg, #2388f2, #1671d6);
}

.entry-learn::before {
  width: 21px;
  height: 16px;
  border-radius: 8px 8px 5px 5px;
  background: #fff;
}

.entry-learn::after {
  top: 23px;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.entry-learn i {
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1671d6;
}

.entry-icon.teal {
  background: linear-gradient(135deg, #14c5a6, #0fae92);
}

.entry-icon.violet {
  background: linear-gradient(135deg, #8d66f2, #6a56db);
}

.entry-icon.blue {
  background: linear-gradient(135deg, #2388f2, #1671d6);
}

.apply-hero-card {
  margin-bottom: 12px;
  border: 1px solid #c9e5df;
  border-radius: 8px;
  padding: 14px;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 195, 101, 0.22), transparent 25%),
    linear-gradient(135deg, #e8f8f4, #edf6ff);
  box-shadow: 0 10px 24px rgba(32, 130, 95, 0.08);
}

.apply-hero-card p {
  margin: 0 0 10px;
  color: #15596a;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.45;
}

.policy-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.policy-mini-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-areas:
    "icon title"
    "icon copy";
  column-gap: 10px;
  min-height: 82px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  text-align: left;
  background: #fff;
  box-shadow: 0 10px 22px rgba(33, 70, 96, 0.08);
}

.policy-mini-card span {
  grid-area: icon;
}

.policy-mini-card strong {
  display: block;
  grid-area: title;
  margin: 2px 0 3px;
  font-size: 15px;
  line-height: 1.25;
}

.policy-mini-card p {
  grid-area: copy;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.policy-mini-card.warm {
  background: linear-gradient(145deg, #fff8e9, #fff);
}

.policy-mini-card.warm span {
  background: linear-gradient(135deg, #ffb948, #ee9d2d);
}

.policy-mini-card.fresh {
  background: linear-gradient(145deg, #ebfbf2, #fff);
}

.policy-mini-card.fresh span {
  background: linear-gradient(135deg, #40c892, #25a976);
}

.policy-mini-card.sky {
  background: linear-gradient(145deg, #eaf6ff, #fff);
}

.policy-mini-card.sky span {
  background: linear-gradient(135deg, #5eb5ff, #2b8ee8);
}

.policy-mini-card.lilac {
  background: linear-gradient(145deg, #f3efff, #fff);
}

.policy-mini-card.lilac span {
  background: linear-gradient(135deg, #9b83f1, #7c66d8);
}

.card-illu {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

.card-illu.prepare {
  background: linear-gradient(135deg, #ffb948, #ee9d2d);
}

.card-illu.consult {
  background: linear-gradient(135deg, #40c892, #25a976);
}

.card-illu.pregnant {
  background: linear-gradient(135deg, #5eb5ff, #2b8ee8);
}

.card-illu.family {
  background: linear-gradient(135deg, #9b83f1, #7c66d8);
}

.card-illu::before,
.card-illu::after,
.card-illu i {
  content: "";
  position: absolute;
  display: block;
}

.card-illu.prepare::before {
  left: 9px;
  bottom: 8px;
  width: 20px;
  height: 14px;
  border-radius: 8px 8px 5px 5px;
  background: #fff;
}

.card-illu.prepare::after {
  left: 17px;
  bottom: 20px;
  width: 5px;
  height: 11px;
  border-radius: 999px;
  background: #fff;
  transform: rotate(-22deg);
}

.card-illu.consult::before {
  left: 8px;
  top: 9px;
  width: 22px;
  height: 17px;
  border-radius: 9px;
  background: #fff;
}

.card-illu.consult::after {
  left: 14px;
  bottom: 8px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #fff;
  transform: rotate(45deg);
}

.card-illu.pregnant::before {
  left: 13px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
}

.card-illu.pregnant::after {
  left: 10px;
  bottom: 7px;
  width: 18px;
  height: 19px;
  border-radius: 12px 12px 9px 9px;
  background: #fff;
}

.card-illu.family::before {
  left: 7px;
  bottom: 8px;
  width: 24px;
  height: 17px;
  border-radius: 7px;
  background: #fff;
}

.card-illu.family::after {
  left: 11px;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: #fff;
  transform: rotate(45deg);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-panel,
.guidance-panel,
.form-panel,
.status-panel,
.record-panel,
.contact-panel,
.profile-panel,
.account-panel,
.admin-entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(29, 54, 72, 0.06);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 18px 16px 16px;
  background:
    linear-gradient(90deg, rgba(15, 111, 120, 0.06), transparent 38%),
    #fff;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.trust-row span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(15, 111, 120, 0.2);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--primary-deep);
  background: rgba(233, 245, 244, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.hero-copy h2 {
  max-width: 11em;
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.14;
}

.hero-copy p {
  max-width: 29em;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.hero-actions {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
  margin-top: 17px;
}

.process-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 12px 0;
}

.process-strip div {
  min-width: 0;
  padding: 11px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.process-strip span {
  display: block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.process-strip strong,
.process-strip em {
  display: block;
}

.process-strip strong {
  margin-top: 7px;
  font-size: 13px;
}

.process-strip em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.guidance-panel {
  margin-top: 12px;
  padding: 16px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
}

.section-head.compact {
  align-items: flex-start;
}

.section-head span {
  display: inline-grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  padding: 0 8px;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.section-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.25;
}

.condition-list {
  display: grid;
  gap: 8px;
}

.condition-list article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #e2eaec;
  border-radius: 8px;
  background: var(--surface-soft);
}

.condition-list strong {
  font-size: 14px;
}

.condition-list p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.disclaimer {
  margin: 12px 0 0;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.65;
}

.knowledge-hero {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 17px;
  border: 1px solid #d4e8e9;
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 26%, rgba(255, 214, 149, 0.55), transparent 28%),
    linear-gradient(135deg, #eaf9f6, #f7fbff);
  box-shadow: 0 10px 24px rgba(29, 54, 72, 0.06);
}

.knowledge-hero h2 {
  margin: 8px 0 7px;
  font-size: 22px;
  line-height: 1.18;
}

.knowledge-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.knowledge-visual {
  position: relative;
  min-height: 108px;
}

.knowledge-visual::before,
.knowledge-visual::after,
.knowledge-visual span,
.knowledge-visual i {
  content: "";
  position: absolute;
  display: block;
}

.knowledge-visual::before {
  right: 5px;
  top: 6px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffc66e, #ffdd9a);
  animation: softFloat 3.8s ease-in-out infinite;
}

.knowledge-visual::after {
  right: 2px;
  bottom: 12px;
  width: 92px;
  height: 58px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 -16px #40b99c;
}

.knowledge-visual span {
  right: 30px;
  top: 26px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
}

.knowledge-visual i {
  right: 44px;
  bottom: 27px;
  z-index: 3;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0b6f78;
  box-shadow: 18px 0 #0b6f78, 9px 14px 0 -2px #ff8aa0;
}

.knowledge-list {
  display: grid;
  gap: 10px;
}

.knowledge-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid #e0eaed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(29, 54, 72, 0.05);
}

.knowledge-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.knowledge-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.knowledge-action {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 10px;
  margin-top: 12px;
}

.apply-note,
.article-hero,
.article-section,
.article-tips,
.library-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(29, 54, 72, 0.06);
}

.apply-note {
  margin-bottom: 12px;
  padding: 13px;
  background: linear-gradient(135deg, #eef9f7, #fff);
}

.apply-note strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.apply-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.compact-knowledge {
  grid-template-columns: 1fr 82px;
  padding: 14px;
}

.compact-knowledge .knowledge-visual {
  min-height: 82px;
  transform: scale(0.78);
  transform-origin: center;
}

.library-grid {
  display: grid;
  gap: 10px;
}

.library-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 12px;
  width: 100%;
  min-height: 94px;
  align-items: center;
  padding: 13px;
  border-color: #dfe9ec;
  color: inherit;
  text-align: left;
}

.library-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.library-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.article-hero {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  overflow: hidden;
  padding: 16px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 205, 118, 0.34), transparent 24%),
    linear-gradient(135deg, #eef9f7, #f8fbff);
}

.article-hero h2 {
  margin: 8px 0;
  font-size: 23px;
  line-height: 1.18;
}

.article-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
}

.article-visual {
  position: relative;
  min-height: 112px;
}

.article-visual::before,
.article-visual::after,
.article-visual span,
.article-visual i {
  content: "";
  position: absolute;
  display: block;
}

.article-visual::before {
  inset: 16px 18px auto auto;
  width: 66px;
  height: 66px;
  border-radius: 24px;
  background: linear-gradient(135deg, #55c7b4, #1b8d7d);
  transform: rotate(8deg);
}

.article-visual::after {
  right: 20px;
  bottom: 12px;
  width: 74px;
  height: 42px;
  border-radius: 20px 20px 13px 13px;
  background: #fff;
  box-shadow: inset 0 -12px rgba(33, 136, 125, 0.18);
}

.article-visual span {
  right: 44px;
  top: 22px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffdbac;
}

.article-visual i {
  right: 46px;
  bottom: 25px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #17333b;
  box-shadow: 17px 0 #17333b, 8px 13px 0 -2px #ff86a0;
}

.article-visual.infertility::before,
.article-visual.materials::before {
  background: linear-gradient(135deg, #35c690, #209369);
}

.article-visual.pregnant::before {
  background: linear-gradient(135deg, #58b7ff, #2d89e6);
}

.article-visual.postpartum::before {
  background: linear-gradient(135deg, #9a82ef, #7861d6);
}

.article-visual.policy::before,
.article-visual.local::before {
  background: linear-gradient(135deg, #ffb340, #f28b24);
}

.article-body {
  display: grid;
  gap: 10px;
}

.article-section {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 14px;
}

.article-step {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.article-section h3 {
  margin: 3px 0 7px;
  font-size: 17px;
  line-height: 1.25;
}

.article-section p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.article-mini-visual {
  position: relative;
  display: block;
  width: 100%;
  height: 58px;
  margin-top: 11px;
  overflow: hidden;
  border: 1px solid rgba(207, 219, 223, 0.72);
  border-radius: 8px;
  background:
    radial-gradient(circle at 82% 24%, rgba(255, 211, 132, 0.48), transparent 22%),
    linear-gradient(135deg, #f7fbff, #eef9f7);
}

.article-mini-visual::before,
.article-mini-visual::after,
.article-mini-visual i {
  content: "";
  position: absolute;
  display: block;
}

.article-mini-visual::before {
  left: 14px;
  top: 13px;
  width: 56px;
  height: 32px;
  border-radius: 18px;
  background: rgba(15, 111, 120, 0.12);
}

.article-mini-visual::after {
  right: 19px;
  top: 12px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, #5ad0bf, #168f7e);
  box-shadow: inset -8px -8px 12px rgba(8, 88, 80, 0.16);
  transform: rotate(7deg);
}

.article-mini-visual i {
  left: 27px;
  top: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0f6f78;
  box-shadow: 18px 0 #0f6f78, 86px 1px 0 2px rgba(35, 136, 242, 0.18), 116px 0 0 3px rgba(255, 179, 64, 0.2);
}

.article-mini-visual.policy::after,
.article-mini-visual.local::after {
  background: linear-gradient(135deg, #ffbd59, #f28b24);
}

.article-mini-visual.materials::after,
.article-mini-visual.infertility::after {
  background: linear-gradient(135deg, #4bd69d, #209369);
}

.article-mini-visual.pregnant::after {
  background: linear-gradient(135deg, #71c3ff, #2d89e6);
}

.article-mini-visual.postpartum::after {
  background: linear-gradient(135deg, #aa92f4, #7861d6);
}

.article-mini-visual.mini-2::before {
  width: 44px;
  border-radius: 8px;
  background: rgba(255, 179, 64, 0.16);
}

.article-mini-visual.mini-3 {
  background:
    radial-gradient(circle at 22% 28%, rgba(86, 198, 180, 0.22), transparent 24%),
    linear-gradient(135deg, #fffaf0, #f7fbff);
}

.article-mini-visual.mini-4::after {
  border-radius: 50% 50% 16px 16px;
}

.article-tips {
  margin-top: 10px;
  padding: 14px;
  background: linear-gradient(135deg, #fffaf0, #fff);
}

.article-tips strong {
  display: block;
  margin-bottom: 10px;
}

.article-tips div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-tips span {
  border-radius: 999px;
  padding: 7px 10px;
  color: #7b541d;
  background: #fff2d6;
  font-size: 12px;
  font-weight: 900;
}

.article-source {
  margin: 10px 2px 0;
  color: var(--subtle);
  font-size: 12px;
  line-height: 1.6;
}

.article-actions {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 10px;
  margin-top: 12px;
}

.form-panel {
  padding: 18px 17px;
}

.form-intro {
  margin-bottom: 14px;
}

.form-intro h2 {
  margin: 7px 0 7px;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.22;
}

.form-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.form-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.form-steps span {
  display: grid;
  min-height: 38px;
  place-items: center;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.form-steps span:last-child {
  border-right: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field span,
.field legend {
  color: #31414c;
  font-size: 13px;
  font-weight: 800;
}

.field input[type="text"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="file"],
.field select,
.admin-login input,
.toolbar input,
.toolbar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfdbdf;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.field input[type="file"] {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: 13px;
}

.field input:focus,
.field select:focus,
.admin-login input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 111, 120, 0.13);
}

.field-hint {
  color: #6b7d88;
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice-grid label,
.segmented label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 41px;
  padding: 8px 10px;
  border: 1px solid #d7e1e4;
  border-radius: 8px;
  background: var(--surface-soft);
  color: #31414c;
  font-size: 13px;
  font-weight: 700;
}

.choice-grid input,
.segmented input,
.consent input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

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

.segmented label {
  justify-content: center;
  text-align: center;
}

.consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 15px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.primary-action,
.secondary-action,
.ghost-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 15px;
  font-weight: 850;
}

.primary-action {
  width: 100%;
  color: #fff;
  background: linear-gradient(180deg, #1a91e8, #0c7d88);
  box-shadow: 0 9px 18px rgba(12, 125, 136, 0.18);
}

.primary-action:hover {
  background: linear-gradient(180deg, #167ed5, #095d68);
}

.secondary-action {
  color: #fff;
  background: var(--green);
}

.ghost-action {
  color: var(--primary-deep);
  border-color: #c8d8dc;
  background: #fff;
}

.microcopy {
  margin: 10px 0 0;
  color: var(--subtle);
  font-size: 12px;
  text-align: center;
}

.status-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.status-label {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--amber);
  background: #fff7e9;
  font-size: 12px;
  font-weight: 900;
}

.status-panel strong {
  display: block;
  font-size: 20px;
}

.status-panel p,
.contact-panel p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.timeline {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  grid-template-areas:
    "dot title"
    "dot note";
  gap: 2px 10px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.timeline-item span {
  grid-area: dot;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 2px solid #b9c9ce;
  border-radius: 50%;
  background: #fff;
}

.timeline-item strong {
  grid-area: title;
  font-size: 14px;
}

.timeline-item em {
  grid-area: note;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.timeline-item.done span,
.timeline-item.active span {
  border-color: var(--green);
  background: var(--green);
}

.timeline-item.active {
  border-color: rgba(32, 130, 95, 0.42);
  background: #f0faf6;
}

.record-panel,
.account-panel {
  padding: 15px;
}

.record-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.record-title h3,
.contact-panel h3,
.account-panel h3 {
  margin: 0;
  font-size: 17px;
}

pre,
#profileRecord {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #31414c;
  font-size: 13px;
  line-height: 1.65;
}

.contact-panel {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
  padding: 15px;
}

.staff-avatar,
.profile-avatar {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--green));
  font-weight: 900;
}

.staff-avatar {
  width: 48px;
  height: 48px;
}

.contact-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin-top: 16px;
}

.profile-panel {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 13px;
  align-items: center;
  padding: 15px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

.auto-avatar {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 221, 154, 0.9), transparent 22%),
    linear-gradient(135deg, #63c7b0, #2388f2);
}

.auto-avatar::before,
.auto-avatar::after,
.auto-avatar span,
.auto-avatar i {
  content: "";
  position: absolute;
  display: block;
}

.auto-avatar::before {
  left: 13px;
  top: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffe3bf;
  box-shadow: inset -5px -3px rgba(246, 190, 146, 0.38);
}

.auto-avatar::after {
  left: 10px;
  bottom: -4px;
  width: 38px;
  height: 27px;
  border-radius: 18px 18px 10px 10px;
  background: #fff;
  box-shadow: inset 0 -10px rgba(15, 111, 120, 0.2);
}

.auto-avatar .avatar-face {
  z-index: 2;
  left: 22px;
  top: 20px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #17212b;
  box-shadow: 12px 0 #17212b, 6px 9px 0 -1px #f58ca0;
}

.auto-avatar .avatar-body {
  z-index: 3;
  right: 6px;
  bottom: 8px;
  width: 17px;
  height: 17px;
  border-radius: 8px 8px 8px 3px;
  background: #fff4d8;
  transform: rotate(-8deg);
}

.auto-avatar i {
  z-index: 4;
  right: 11px;
  bottom: 13px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #0f6f78;
  box-shadow: 7px 0 #0f6f78;
}

.auto-avatar.avatar-1 {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 202, 123, 0.9), transparent 22%),
    linear-gradient(135deg, #84d4bc, #5b68f0);
}

.auto-avatar.avatar-2 {
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.8), transparent 24%),
    linear-gradient(135deg, #78c6ff, #44b996);
}

.profile-panel strong {
  display: block;
  font-size: 18px;
}

.profile-panel span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

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

.profile-actions .secondary-action {
  min-height: 42px;
  padding: 0 9px;
  font-size: 13px;
}

.admin-entry {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 15px;
}

.admin-entry span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-entry strong {
  color: var(--primary-deep);
  font-size: 16px;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 520px);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(219, 228, 231, 0.95);
  background: rgba(255, 255, 255, 0.96);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.tabbar button {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.tabbar button span {
  font-size: 18px;
  line-height: 1;
}

.tabbar button.active {
  color: var(--primary-deep);
  background: var(--primary-soft);
}

.care-companion {
  position: fixed;
  right: max(-30px, calc((100vw - 520px) / 2 - 30px));
  top: 54vh;
  z-index: 28;
  display: grid;
  justify-items: end;
  gap: 6px;
  touch-action: none;
  user-select: none;
  pointer-events: auto;
  cursor: grab;
  filter: drop-shadow(0 10px 15px rgba(21, 83, 92, 0.14));
  transform: rotate(-5deg);
  transform-origin: 90% 55%;
  transition: right 0.36s cubic-bezier(0.18, 0.9, 0.2, 1.12), transform 0.36s cubic-bezier(0.18, 0.9, 0.2, 1.12), filter 0.22s ease;
}

.care-companion.open {
  right: max(7px, calc((100vw - 520px) / 2 + 7px));
  transform: rotate(0deg);
  filter: drop-shadow(0 18px 26px rgba(21, 83, 92, 0.22));
}

.care-companion:active {
  cursor: grabbing;
}

.companion-bubble {
  width: min(176px, calc(100vw - 104px));
  max-height: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 111, 120, 0.16);
  border-radius: 8px;
  padding: 0 10px;
  color: #12313c;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(29, 54, 72, 0.16);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(8px);
  transition: max-height 0.22s ease, padding 0.22s ease, opacity 0.18s ease, transform 0.18s ease;
}

.care-companion.open .companion-bubble {
  max-height: 118px;
  padding: 9px 10px;
  opacity: 1;
  transform: translateY(0);
}

.companion-avatar {
  position: relative;
  width: 62px;
  height: 92px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform-style: preserve-3d;
  transition: width 0.32s ease, height 0.32s ease, transform 0.32s ease;
}

.care-companion.open .companion-avatar {
  width: 86px;
  height: 127px;
  transform: translateX(-4px);
}

.companion-image {
  position: absolute;
  right: 0;
  bottom: 0;
  width: auto;
  height: 100%;
  max-width: none;
  pointer-events: none;
  transform-origin: 56% 86%;
  animation: mascotImagePeek 2.2s ease-in-out infinite;
}

.care-companion.open .companion-image {
  animation: mascotImageWave 1.35s ease-in-out infinite;
}

.companion-canvas {
  position: absolute;
  inset: -12px -18px;
  width: calc(100% + 36px);
  height: calc(100% + 28px);
  pointer-events: none;
}

.companion-image + .companion-canvas {
  display: none;
}

.companion-css {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: mascotHop 1.42s ease-in-out infinite;
}

.care-companion.three-ready .companion-css {
  display: none;
}

@keyframes mascotImagePeek {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-4px) rotate(1deg);
  }
}

@keyframes mascotImageWave {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg) scale(1);
  }
  45% {
    transform: translateY(-8px) rotate(5deg) scale(1.02);
  }
  70% {
    transform: translateY(-3px) rotate(-1deg) scale(1);
  }
}

.companion-css span,
.companion-css span::before,
.companion-css span::after {
  content: "";
  position: absolute;
  display: block;
}

.mascot-shadow {
  left: 18px;
  bottom: 6px;
  width: 32px;
  height: 8px;
  border-radius: 50%;
  background: rgba(13, 66, 72, 0.2);
  filter: blur(1px);
  animation: mascotShadow 1.42s ease-in-out infinite;
}

.mascot-body {
  left: 31px;
  top: 41px;
  width: 26px;
  height: 33px;
  border-radius: 18px 18px 15px 15px;
  background:
    radial-gradient(circle at 70% 18%, rgba(255, 255, 255, 0.78) 0 4px, transparent 5px),
    linear-gradient(150deg, #62dfd0 0%, #2fae9f 58%, #168676 100%);
  box-shadow:
    inset -8px -9px 12px rgba(9, 84, 82, 0.2),
    inset 8px 7px 12px rgba(255, 255, 255, 0.36);
}

.mascot-head {
  left: 23px;
  top: 16px;
  width: 34px;
  height: 32px;
  border-radius: 46% 46% 43% 43%;
  background:
    radial-gradient(circle at 32% 43%, #162c35 0 2px, transparent 3px),
    radial-gradient(circle at 67% 43%, #162c35 0 2px, transparent 3px),
    radial-gradient(circle at 52% 67%, #ff8fa6 0 2px, transparent 3px),
    linear-gradient(145deg, #ffe6c8 0%, #ffd3a8 64%, #f7b985 100%);
  box-shadow:
    inset -7px -6px 10px rgba(143, 87, 45, 0.12),
    inset 8px 8px 12px rgba(255, 255, 255, 0.42);
  animation: mascotLook 3.2s ease-in-out infinite;
}

.mascot-head::before {
  left: 3px;
  top: -4px;
  width: 28px;
  height: 9px;
  border-radius: 999px 999px 12px 12px;
  background: linear-gradient(90deg, #684838, #88624d);
  transform: rotate(-5deg);
}

.mascot-arm {
  top: 49px;
  width: 10px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(160deg, #ffe2bd, #f4b67f);
  transform-origin: 50% 8px;
}

.mascot-arm-left {
  left: 28px;
  transform: rotate(26deg);
  animation: mascotArmLeft 1.42s ease-in-out infinite;
}

.mascot-arm-right {
  right: 4px;
  transform: rotate(-42deg);
  animation: mascotWave 1.05s ease-in-out infinite;
}

.mascot-leg {
  top: 69px;
  width: 9px;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3963ce, #223d92);
  transform-origin: 50% 4px;
}

.mascot-leg-left {
  left: 37px;
  animation: mascotLegLeft 0.72s ease-in-out infinite;
}

.mascot-leg-right {
  right: 13px;
  animation: mascotLegRight 0.72s ease-in-out infinite;
}

.mascot-heart {
  right: 6px;
  top: 12px;
  width: 9px;
  height: 9px;
  background: #ff7592;
  transform: rotate(-12deg);
  animation: heartBeat 1.55s ease-in-out infinite;
}

.mascot-heart::before,
.mascot-heart::after {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff7592;
}

.mascot-heart::before {
  left: 0;
  top: -4px;
}

.mascot-heart::after {
  left: 4px;
  top: 0;
}

@keyframes mascotHop {
  0%,
  100% {
    transform: translateY(0) rotateZ(-1deg);
  }
  50% {
    transform: translateY(-5px) rotateZ(2deg);
  }
}

@keyframes mascotShadow {
  0%,
  100% {
    transform: scaleX(1);
    opacity: 0.6;
  }
  50% {
    transform: scaleX(0.72);
    opacity: 0.35;
  }
}

@keyframes mascotLook {
  0%,
  100% {
    transform: rotateY(-8deg);
  }
  50% {
    transform: rotateY(8deg);
  }
}

@keyframes mascotWave {
  0%,
  100% {
    transform: rotate(-48deg);
  }
  50% {
    transform: rotate(-118deg) translateY(-3px);
  }
}

@keyframes mascotArmLeft {
  0%,
  100% {
    transform: rotate(24deg);
  }
  50% {
    transform: rotate(4deg);
  }
}

@keyframes mascotLegLeft {
  0%,
  100% {
    transform: rotate(18deg) translateY(0);
  }
  50% {
    transform: rotate(-18deg) translateY(-2px);
  }
}

@keyframes mascotLegRight {
  0%,
  100% {
    transform: rotate(-18deg) translateY(-2px);
  }
  50% {
    transform: rotate(18deg) translateY(0);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom));
  z-index: 30;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 11px 14px;
  border-radius: 8px;
  color: #fff;
  background: rgba(23, 32, 51, 0.93);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.admin-page {
  min-height: 100vh;
  background: #f4f7fb;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.admin-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-top h1 {
  margin: 4px 0 0;
  font-size: 26px;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(130px, 190px) auto;
  gap: 10px;
}

.admin-password-panel {
  display: grid;
  grid-template-columns: 1fr minmax(360px, 520px);
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(15, 111, 120, 0.16);
  border-radius: 8px;
  padding: 15px;
  background: linear-gradient(135deg, #eef9f7, #fff);
  box-shadow: 0 12px 28px rgba(35, 60, 90, 0.06);
}

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

.admin-password-panel h2 {
  margin: 4px 0 4px;
  font-size: 18px;
}

.admin-password-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.password-change-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.password-change-form input {
  min-height: 42px;
  border: 1px solid #cfdbdf;
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.password-change-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 111, 120, 0.13);
}

.admin-password-panel.password-locked .password-change-form {
  display: none;
}

.admin-locked {
  display: grid;
  min-height: 280px;
  place-items: center;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background:
    radial-gradient(circle at 86% 18%, rgba(15, 111, 120, 0.12), transparent 24%),
    #fff;
  box-shadow: 0 14px 34px rgba(35, 60, 90, 0.08);
  text-align: center;
}

.admin-locked h2 {
  margin: 8px 0;
  font-size: 24px;
}

.admin-locked p {
  margin: 0;
  color: var(--muted);
}

.admin-page:not(.admin-authed) .stat-grid,
.admin-page:not(.admin-authed) .admin-layout {
  display: none;
}

.admin-page.admin-authed .admin-locked {
  display: none;
}

.admin-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 14px;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(35, 60, 90, 0.08);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.stat-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stat-card strong {
  display: block;
  font-size: 24px;
}

.stat-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.lead-list-panel {
  overflow: hidden;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr 142px;
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.lead-list {
  display: grid;
  max-height: 640px;
  overflow: auto;
}

.lead-item {
  display: grid;
  gap: 6px;
  width: 100%;
  min-height: 82px;
  border: 0;
  border-bottom: 1px solid #edf1f6;
  padding: 12px 14px;
  color: inherit;
  background: #fff;
  text-align: left;
}

.lead-item strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lead-status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--primary-deep);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 900;
}

.lead-item:hover,
.lead-item.active {
  background: #eef8f7;
}

.lead-item strong {
  font-size: 14px;
}

.lead-item span {
  color: var(--muted);
  font-size: 12px;
}

.admin-detail-panel {
  padding: 16px;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.detail-head h2 {
  margin: 0;
  font-size: 21px;
}

.status-select {
  display: grid;
  grid-template-columns: 180px auto;
  gap: 9px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.detail-field {
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.detail-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-field strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  line-height: 1.45;
}

.detail-qr {
  display: block;
  width: min(180px, 100%);
  margin-top: 8px;
  border: 1px solid #d7e1e4;
  border-radius: 8px;
  background: #fff;
}

.summary-box {
  min-height: 180px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.empty-state {
  padding: 32px 14px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 760px) {
  .client-shell {
    box-shadow: 0 0 0 1px rgba(219, 228, 231, 0.68);
  }
}

@media (max-width: 760px) {
  .hero-copy h2 {
    font-size: 24px;
  }

  .segmented,
  .choice-grid,
  .contact-actions {
    grid-template-columns: 1fr;
  }

  .status-panel,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    width: min(100% - 24px, 520px);
    padding: 18px 0;
  }

  .admin-top,
  .detail-head {
    display: grid;
    align-items: stretch;
  }

  .admin-login,
  .admin-password-panel,
  .password-change-form,
  .admin-layout,
  .stat-grid,
  .toolbar,
  .status-select,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .client-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .client-topbar {
    margin-left: -12px;
    margin-right: -12px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .form-grid,
  .hero-actions,
  .form-steps,
  .knowledge-action {
    grid-template-columns: 1fr;
  }

  .profile-actions {
    grid-template-columns: 1fr 1fr;
  }

  .process-strip {
    gap: 7px;
  }

  .process-strip div {
    padding: 10px 7px;
  }

  .process-strip strong {
    font-size: 13px;
  }

  .process-strip em {
    display: none;
  }

  .form-steps span {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .form-steps span:last-child {
    border-bottom: 0;
  }

  .hero-copy h2 {
    font-size: 23px;
  }

  .policy-carousel {
    min-height: 216px;
  }

  .policy-slide {
    grid-template-columns: 1.25fr 0.75fr;
    padding: 14px 12px 32px;
  }

  .slide-copy h2 {
    font-size: 22px;
  }

  .slide-copy p {
    font-size: 11px;
  }

  .slide-action {
    min-height: 28px;
    padding: 0 11px;
    font-size: 12px;
  }

  .quick-entry-panel {
    margin-left: 10px;
    margin-right: 10px;
  }
}
