/* The home invitation and the daily record share one clear task hierarchy. */
#home.home-reference .home-today-card { display: grid; gap: 11px; min-height: 0; padding: 20px; }
#home.home-reference .home-today-card .home-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#home.home-reference .home-today-card .home-card-top span { font-size: 13px; }
#home.home-reference .home-today-card .home-card-top b { flex: none; margin: 0; padding: 6px 10px; border-radius: 999px; color: #168b68; background: #dff5e8; font-size: 12px; font-weight: 700; letter-spacing: 0; }
#home.home-reference .home-today-card h2 { margin: 2px 0 0; font-size: clamp(19px, 5.2vw, 23px); line-height: 1.3; }
#home.home-reference .home-today-card p { margin: 0; padding: 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
#home.home-reference .home-today-card button { position: static; width: 100%; min-height: 46px; margin-top: 2px; border-radius: 999px; font-weight: 700; }

/* The record route owns its navigation. Global app chrome would duplicate it. */
body.record-flow-active { background: #fff; }
body.record-flow-active .topbar, body.record-flow-active .mobile-tabbar,
body.record-flow-active footer[aria-label="网站备案信息"] { display: none; }
body.record-flow-active main { padding-bottom: 0; }
#lifestyle.daily-record-page { min-height: 100dvh; padding: calc(18px + env(safe-area-inset-top)) 18px calc(34px + env(safe-area-inset-bottom)); color: #20372e; background: #fff; }
#lifestyle .entry-page, #lifestyle .record-service-progress { max-width: 620px; margin-inline: auto; }
#lifestyle .entry-shell { padding: 0; }
#lifestyle .entry-shell > .dialog-head { display: flex; align-items: center; gap: 15px; margin: 0 0 25px; padding: 0 0 18px; border-bottom: 1px solid #dfe9e3; background: #fff; }
#lifestyle .entry-shell > .dialog-head > div { min-width: 0; }
#lifestyle .entry-shell > .dialog-head h2 { margin: 0 0 3px; color: #20372e; font-size: 21px; line-height: 1.25; }
#lifestyle .entry-shell > .dialog-head p { margin: 0; color: #5f706a; font-size: 12px; line-height: 1.4; }
#lifestyle .entry-page-back { flex: none; min-height: 42px; padding: 0 13px; border: 1px solid #b7dccb; border-radius: 999px; color: #168b68; background: #fff; font-size: 14px; }
#lifestyle .entry-date { display: block; margin: 0 0 18px; color: #20372e; font-size: 14px; font-weight: 650; }
#lifestyle .entry-date input { display: block; width: 100%; min-height: 48px; margin-top: 8px; padding: 8px 12px; border: 1px solid #dfe9e3; border-radius: 13px; color: #20372e; background: #fff; }
#lifestyle .entry-focus-summary { margin-bottom: 24px; padding: 16px; border-radius: 18px; background: #e9f3ed; }
#lifestyle #entryFocusStatus { margin: 0 0 11px; color: #176f54; font-size: 14px; font-weight: 650; line-height: 1.5; }
#lifestyle #entryFocusMeter { display: block; width: 100%; height: 7px; border: 0; border-radius: 999px; overflow: hidden; appearance: none; background: #cfe5d8; }
#lifestyle #entryFocusMeter::-webkit-progress-bar { border-radius: 999px; background: #cfe5d8; }
#lifestyle #entryFocusMeter::-webkit-progress-value { border-radius: 999px; background: #2bc981; }
#lifestyle #entryFocusMeter::-moz-progress-bar { border-radius: 999px; background: #2bc981; }
#lifestyle #entryFocusMeter[hidden] { display: none; }
#lifestyle #entryRetry { margin: -6px 0 18px; }
#lifestyle .entry-groups section { margin: 0 0 22px; }
#lifestyle #entryTypes { scroll-margin-top: 24px; }
#lifestyle .entry-groups h4, #lifestyle .entry-history h3 { margin: 0 0 14px; color: #20372e; font-size: 17px; line-height: 1.3; }
#lifestyle .entry-tiles { display: grid; grid-template-columns: 1fr; gap: 8px; }
#lifestyle .entry-tile { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; padding: 15px 16px; border: 1px solid transparent; border-radius: 17px; color: #20372e; background: #f1f5f2; text-align: left; }
#lifestyle .entry-tile strong { font-size: 16px; }
#lifestyle .entry-tile small { flex: none; margin: 0; color: #71827a; font-size: 12px; }
#lifestyle .entry-tile.is-recorded small { color: #168b68; font-weight: 700; }
#lifestyle .entry-tile.selected { border-color: #2bc981; background: #dff5e8; }
#lifestyle .entry-optional { margin: 0 0 15px; padding: 3px 0; border-top: 1px solid #dfe9e3; }
#lifestyle .entry-optional summary { display: flex; align-items: center; min-height: 46px; color: #168b68; font-size: 14px; font-weight: 650; }
#lifestyle .entry-optional .entry-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#lifestyle .entry-optional .entry-tile { display: block; min-height: 70px; }
#lifestyle .entry-optional .entry-tile small { display: block; margin-top: 6px; }
#lifestyle .entry-history { margin: 25px 0 20px; padding-top: 22px; border-top: 1px solid #dfe9e3; }
#lifestyle .entry-history-row { border-bottom-color: #dfe9e3; }
#lifestyle .entry-disclaimer { margin: 18px 0; color: #5f706a; line-height: 1.6; }
#lifestyle .record-service-progress { margin-top: 25px; padding: 10px 0; border-top: 1px solid #dfe9e3; color: #5f706a; line-height: 1.55; }
#lifestyle .record-service-progress summary { min-height: 44px; color: #168b68; font-weight: 650; cursor: pointer; }
#lifestyle .record-service-progress p { margin: 8px 0; }

/* One record at a time. The save action remains visible while fields scroll. */
#lifestyle.entry-form-active { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
#lifestyle.entry-form-active .entry-shell > .dialog-head,
#lifestyle.entry-form-active .entry-history,
#lifestyle.entry-form-active #openLegacyCheckin,
#lifestyle.entry-form-active .entry-disclaimer,
#lifestyle.entry-form-active .record-service-progress { display: none; }
#lifestyle .entry-shell form { margin: 0; padding: 0; border: 0; border-radius: 0; background: #fff; }
#lifestyle .entry-form-switch { position: static; margin: 0 0 22px; padding: 0 0 18px; border-bottom: 1px solid #dfe9e3; border-radius: 0; background: #fff; }
#lifestyle .entry-form-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; margin: 0; }
#lifestyle #entryBackToTypes { grid-column: 1 / -1; justify-self: start; min-height: 42px; margin-bottom: 8px; padding: 0 3px; color: #168b68; font-size: 14px; }
#lifestyle .entry-form-heading h4 { margin: 0; color: #20372e; font-size: 25px; line-height: 1.3; }
#lifestyle .entry-form-heading small { color: #5f706a; font-size: 12px; }
#lifestyle .entry-quick-switch { display: none; }
#lifestyle .entry-shell form label { display: block; margin: 18px 0; color: #20372e; font-size: 14px; font-weight: 650; line-height: 1.5; }
#lifestyle .entry-shell form .fine { color: #5f706a; font-size: 12px; line-height: 1.55; }
#lifestyle .entry-shell form input:not([type="checkbox"]):not([type="radio"]),
#lifestyle .entry-shell form select, #lifestyle .entry-shell form textarea { min-height: 48px; margin-top: 7px; border-color: #dfe9e3; border-radius: 13px; color: #20372e; background: #fff; font-weight: 400; }
#lifestyle .entry-shell form fieldset { margin: 18px 0; padding: 14px; border: 1px solid #dfe9e3; border-radius: 15px; }
#lifestyle .entry-shell form .entry-error { color: #a32e27; }
#lifestyle #entrySaveBtn { position: fixed; z-index: 45; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); width: min(calc(100% - 36px), 484px); min-height: 52px; transform: translateX(-50%); border-radius: 999px; box-shadow: 0 8px 20px #123d2e20; }
#lifestyle .entry-page-back:focus-visible, #lifestyle .entry-tile:focus-visible,
#lifestyle .record-service-progress summary:focus-visible, #lifestyle #entryBackToTypes:focus-visible,
#lifestyle #entrySaveBtn:focus-visible { outline: 3px solid #168b68; outline-offset: 2px; }
@media (max-width: 360px) {
  #home.home-reference .home-today-card { padding: 17px; }
  #home.home-reference .home-today-card .home-card-top { align-items: flex-start; }
  #lifestyle .entry-shell > .dialog-head h2 { font-size: 20px; }
}
