html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

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

body.care-home-page {
  background: linear-gradient(180deg, #f5f8f3 0%, #eef3ed 100%);
  color: #24313c;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

img {
  display: block;
  width: 100%;
}

.care-home-shell {
  position: relative;
  max-width: 390px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f6f9f4;
  overflow: hidden;
}

.care-home-header {
  padding: 10px 14px 0;
}

.care-home-header__title {
  color: #6f7a70;
  font-size: 14px;
  line-height: 1.4;
}

.care-home-main {
  padding: 10px 12px 96px;
}

.greeting-banner {
  padding: 14px 14px 12px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #4cb456 0%, #3eaa49 100%);
  color: #fff;
}

.greeting-banner__hello {
  font-size: 15px;
  font-weight: 700;
}

.greeting-banner__weather {
  margin-top: 5px;
  font-size: 11px;
  opacity: 0.9;
}

.greeting-banner__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
}

.home-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(45, 58, 52, 0.06);
}

.home-content-section,
.checkin-section {
  margin-top: 14px;
}

.home-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.home-section-heading__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2b362f;
  font-size: 14px;
  font-weight: 700;
}

.home-section-heading__title i {
  color: #f0b84d;
}

.home-section-heading__meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8d966b;
  font-size: 11px;
}

.home-section-heading__actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-section-heading__reset {
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(83, 180, 93, 0.26);
  border-radius: 999px;
  background: #f7fbf7;
  color: #4cae57;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.home-section-heading__link {
  color: #54b45e;
  font-size: 11px;
  font-weight: 700;
}

.advice-card {
  margin-top: 12px;
  padding: 14px;
}

.advice-card__text {
  margin: 0;
  color: #6d786e;
  font-size: 12px;
  line-height: 1.8;
}

.advice-card__audio {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4caf59;
  font-size: 12px;
  font-weight: 700;
}

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

.checkin-card,
.action-card {
  padding: 14px 12px;
  text-align: center;
}

.checkin-card__circle {
  width: 26px;
  height: 26px;
  margin: 0 auto;
  border-radius: 50%;
  background: #e4f0df;
}

.checkin-card__title,
.action-card__title {
  margin-top: 12px;
  color: #4a534c;
  font-size: 12px;
  line-height: 1.5;
}

.checkin-card__button,
.action-card__button,
.recipe-card__button {
  min-width: 84px;
  height: 30px;
  margin: 12px auto 0;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #49b356;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.checkin-card__button--done {
  background: #ecefef;
  color: #97a0a5;
  cursor: default;
}

.action-card__icon {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #edf7ee;
  color: #4db45c;
  font-size: 15px;
}

.upload-choice-sheet,
.food-recognition-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.upload-choice-sheet[hidden],
.food-recognition-overlay[hidden] {
  display: none !important;
}

.upload-choice-sheet__mask,
.food-recognition-overlay {
  background: rgba(36, 49, 60, 0.4);
}

.upload-choice-sheet__panel {
  position: absolute;
  left: 50%;
  bottom: 16px;
  width: calc(100% - 24px);
  max-width: 366px;
  transform: translateX(-50%);
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom));
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(36, 49, 60, 0.18);
}

.upload-choice-sheet__title {
  margin-bottom: 12px;
  color: #2f3b32;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.upload-choice-sheet__button,
.upload-choice-sheet__cancel {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.upload-choice-sheet__button {
  margin-bottom: 10px;
  background: #4bb457;
  color: #fff;
}

.upload-choice-sheet__cancel {
  background: #eef2ee;
  color: #6f7a70;
}

.food-recognition-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.food-recognition-overlay__dialog {
  width: 100%;
  max-width: 300px;
  padding: 24px 20px;
  border-radius: 20px;
  background: #fff;
  text-align: center;
  box-shadow: 0 20px 40px rgba(36, 49, 60, 0.2);
}

.food-recognition-overlay__spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border: 4px solid #e4f1e5;
  border-top-color: #4bb457;
  border-radius: 50%;
  animation: food-spin 0.9s linear infinite;
}

.food-recognition-overlay__title {
  color: #2e3a30;
  font-size: 16px;
  font-weight: 700;
}

.food-recognition-overlay__text {
  margin-top: 8px;
  color: #6c776d;
  font-size: 12px;
  line-height: 1.7;
}

.recipe-card {
  overflow: hidden;
}

.recipe-card__tags {
  padding: 12px 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.recipe-card__meal {
  margin-right: auto;
  color: #4f5e54;
  font-size: 13px;
  font-weight: 700;
}

.recipe-card__tag-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipe-card__tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf7ee;
  color: #61b36a;
  font-size: 10px;
  font-weight: 700;
}

.recipe-card__image-wrap {
  padding: 10px 12px 0;
}

.recipe-card__image-wrap img {
  height: 180px;
  border-radius: 10px;
  object-fit: cover;
}

.recipe-card__desc {
  margin: 0;
  padding: 10px 12px 0;
  color: #667269;
  font-size: 12px;
  line-height: 1.7;
}

.recipe-card__stats {
  padding: 12px 12px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.recipe-card__stat {
  text-align: center;
}

.recipe-card__stat span {
  display: block;
  color: #96a095;
  font-size: 10px;
}

.recipe-card__stat strong {
  display: block;
  margin-top: 5px;
  color: #374239;
  font-size: 12px;
}

.recipe-card__actions {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.recipe-card__actions {
  display: none;
}

.recipe-card__favorite {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f3a845;
  font-size: 12px;
}

.recipe-card__button {
  margin: 0;
}

.article-card {
  padding: 14px 12px;
}

.article-card__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f0a945;
  font-size: 13px;
  font-weight: 700;
}

.article-card__date {
  margin-top: 8px;
  color: #9aa39a;
  font-size: 11px;
}

.article-card__excerpt {
  margin: 10px 0 0;
  color: #677268;
  font-size: 12px;
  line-height: 1.8;
}

.article-card__footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.article-card__meta,
.article-card__share {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8e9890;
  font-size: 11px;
}

.article-card__share {
  color: #53b45d;
  font-weight: 700;
}

.care-home-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 1080;
  width: 100%;
  max-width: 390px;
  transform: translateX(-50%);
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(36, 49, 60, 0.08);
  backdrop-filter: blur(14px);
}

.care-home-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #a0a8a3;
  font-size: 11px;
}

.care-home-nav__item i {
  font-size: 18px;
}

.care-home-nav__item.is-active {
  color: #53b25b;
}

@keyframes food-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 768px) {
  body.care-home-page {
    padding: 16px 0;
  }

  .care-home-shell {
    min-height: calc(100vh - 32px);
    border-radius: 28px;
    box-shadow: 0 24px 56px rgba(36, 49, 60, 0.12);
  }

  .care-home-nav {
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
  }
}
