:root {
  --bg0: #e8f2ec;
  --bg1: #f7faf8;
  --ink: #14261f;
  --ink-soft: #3d5a4c;
  --muted: #6b8578;
  --line: rgba(20, 38, 31, 0.1);
  --teal: #0b6e4f;
  --teal-deep: #064c36;
  --mint: #b7e4c7;
  --gold: #d4a017;
  --amber: #e09f3e;
  --coral: #c23b22;
  --sky: #1d6a9a;
  --card: #ffffff;
  --shadow: 0 6px 16px rgba(11, 110, 79, 0.08);
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tab-h: 64px;
  /* 阿里巴巴普惠体 */
  --font: "AlibabaPuHuiTi", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --display: "AlibabaPuHuiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #e8f2ec 0%, #f3f8f5 45%, #eef6f1 100%);
}

body {
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 12px);
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.app {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 0 16px 20px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -16px 14px;
  padding: 12px 16px 10px;
  background: #eef6f1;
  border-bottom: 1px solid var(--line);
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.topbar-titles {
  text-align: center;
  flex: 1;
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.topbar p {
  margin: 2px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.child-switch {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.child-switch-label {
  font-size: 0.7rem;
  color: var(--muted);
}

.child-switch select {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 4px 22px 4px 8px;
  font-size: 0.8rem;
  color: var(--text);
  max-width: 140px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 6px) 55%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}

.child-switch-hint {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  font-size: 1.1rem;
}

.btn-icon.ghost {
  background: transparent;
  border-color: transparent;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 22px 18px 18px;
  color: #f4fff8;
  background:
    linear-gradient(145deg, #0b6e4f 0%, #0e8a62 45%, #146c7a 100%);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.hero-name {
  font-family: var(--display);
  font-size: 1.7rem;
  margin: 0 0 4px;
  position: relative;
  z-index: 1;
}

.hero-sub {
  margin: 0;
  opacity: 0.85;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
  position: relative;
  z-index: 1;
}

.stat {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 10px 8px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 0.7rem;
  opacity: 0.85;
}

.stat.earn b {
  color: #d8ffe8;
}
.stat.deduct b {
  color: #ffd3c8;
}
.stat.net b {
  color: #ffe7a8;
}

/* Sections */
.section {
  margin-top: 18px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.section-head a,
.link {
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 500;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(20, 38, 31, 0.04);
  transition: transform 0.15s ease;
}

.quick:active {
  transform: scale(0.98);
}

.quick .q-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #dff3e8;
  color: var(--teal-deep);
  font-weight: 700;
  font-size: 1.15rem;
}

.quick strong {
  font-size: 0.95rem;
}

.quick small {
  color: var(--muted);
  font-size: 0.75rem;
}

/* Panels / lists */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(20, 38, 31, 0.04);
  overflow: hidden;
}

button.list-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.list-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item .badge {
  flex-shrink: 0;
  margin-top: 2px;
  min-width: 42px;
  min-height: 28px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 999px;
  background: #e7f6ee;
  color: var(--teal-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge.red {
  background: #ffe5df;
  color: var(--coral);
}
.badge.gold {
  background: #fff1c9;
  color: #8a6500;
}
.badge.blue {
  background: #e3f1fb;
  color: var(--sky);
}
.badge.orange {
  background: #ffedd4;
  color: #9a5b00;
}
.badge.pending {
  background: #fff1d6;
  color: #9a5b00;
}

.child-tag {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 600;
  color: var(--brand, #0b6e4f);
  background: rgba(11, 110, 79, 0.1);
  padding: 1px 6px;
  border-radius: 6px;
  margin-right: 4px;
  vertical-align: 1px;
}

.list-item .main {
  flex: 1;
  min-width: 0;
}

.list-item .main strong {
  display: block;
  font-size: 0.95rem;
}

.list-item .main small {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 2px;
  line-height: 1.4;
}

.list-item .amt {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.amt.plus {
  color: var(--teal);
}
.amt.minus {
  color: var(--coral);
}

.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Chips / filters */
.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.chip.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.filters-panel {
  padding: 12px 14px;
}

.filters {
  display: grid;
  gap: 10px;
}

.filters .field {
  margin: 0;
}

.filters .field input,
.filters .field select {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
}

/* Forms */
.form {
  display: grid;
  gap: 12px;
}

.field {
  min-width: 0;
  max-width: 100%;
}

.field label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}

/* 必填：字段标题前红 *（随 [required] / .field-required 自动显示） */
.field:has(:is(input, select, textarea)[required]) > label:first-of-type::before,
.field.field-required > label:first-of-type::before,
.family-hero:has(input[required]) .family-hero-label::before,
.agree-row:has(> input[required]) > span::before {
  content: "*";
  color: #e5484d;
  margin-right: 0.2em;
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}

/* 日期选择：yyyy-MM-dd，与其它 input 同宽 */
.field input.input-date {
  display: block;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='3' stroke='%230b6e4f' stroke-width='1.6'/%3E%3Cpath stroke='%230b6e4f' stroke-width='1.6' stroke-linecap='round' d='M8 3.5v3M16 3.5v3M3.5 10h17'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
  padding-right: 40px;
}

.field input.input-date:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Flatpickr · 学记宝主题 */
.flatpickr-calendar.xjb-datepicker {
  z-index: 80;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  font-family: var(--font);
  width: 308px;
  padding: 8px 6px 10px;
  overflow: hidden;
}

.flatpickr-calendar.xjb-datepicker.arrowTop:before,
.flatpickr-calendar.xjb-datepicker.arrowTop:after,
.flatpickr-calendar.xjb-datepicker.arrowBottom:before,
.flatpickr-calendar.xjb-datepicker.arrowBottom:after {
  display: none;
}

.flatpickr-calendar.xjb-datepicker .flatpickr-months {
  align-items: center;
  padding: 4px 4px 8px;
}

.flatpickr-calendar.xjb-datepicker .flatpickr-months .flatpickr-month {
  height: 36px;
  color: var(--teal-deep);
  fill: var(--teal-deep);
}

.flatpickr-calendar.xjb-datepicker .flatpickr-current-month {
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--display);
  padding-top: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.flatpickr-calendar.xjb-datepicker .flatpickr-current-month .cur-month,
.flatpickr-calendar.xjb-datepicker .flatpickr-current-month input.cur-year {
  font-weight: 600;
  color: var(--teal-deep);
}

.flatpickr-calendar.xjb-datepicker .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar.xjb-datepicker .flatpickr-months .flatpickr-next-month {
  fill: var(--teal);
  color: var(--teal);
  border-radius: 10px;
  top: 6px;
  padding: 4px;
}

.flatpickr-calendar.xjb-datepicker .flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-calendar.xjb-datepicker .flatpickr-months .flatpickr-next-month:hover {
  background: rgba(11, 110, 79, 0.08);
}

.flatpickr-calendar.xjb-datepicker .flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-calendar.xjb-datepicker .flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--teal-deep);
}

.flatpickr-calendar.xjb-datepicker .flatpickr-weekdays {
  height: 28px;
}

.flatpickr-calendar.xjb-datepicker span.flatpickr-weekday {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
}

.flatpickr-calendar.xjb-datepicker .flatpickr-days {
  width: 100%;
}

.flatpickr-calendar.xjb-datepicker .dayContainer {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.flatpickr-calendar.xjb-datepicker .flatpickr-day {
  border-radius: 12px;
  max-width: 40px;
  height: 40px;
  line-height: 40px;
  color: var(--ink);
  border: none;
  margin-top: 2px;
}

.flatpickr-calendar.xjb-datepicker .flatpickr-day:hover,
.flatpickr-calendar.xjb-datepicker .flatpickr-day:focus {
  background: rgba(11, 110, 79, 0.1);
  border-color: transparent;
  color: var(--teal-deep);
}

.flatpickr-calendar.xjb-datepicker .flatpickr-day.today {
  border: 1px solid rgba(11, 110, 79, 0.35);
  color: var(--teal-deep);
  font-weight: 600;
}

.flatpickr-calendar.xjb-datepicker .flatpickr-day.selected,
.flatpickr-calendar.xjb-datepicker .flatpickr-day.selected:hover,
.flatpickr-calendar.xjb-datepicker .flatpickr-day.selected:focus {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(11, 110, 79, 0.28);
}

.flatpickr-calendar.xjb-datepicker .flatpickr-day.flatpickr-disabled,
.flatpickr-calendar.xjb-datepicker .flatpickr-day.prevMonthDay,
.flatpickr-calendar.xjb-datepicker .flatpickr-day.nextMonthDay {
  color: #b7c7bf;
}

.flatpickr-calendar.xjb-datepicker .flatpickr-day.flatpickr-disabled {
  opacity: 0.4;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.12);
}

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

.captcha-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.captcha-row input {
  flex: 1;
  min-width: 0;
}

.captcha-img {
  flex: 0 0 120px;
  width: 120px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #eef5f1;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
}

.captcha-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.amount-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.amount-picks button {
  min-width: 52px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
}

.amount-picks button.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--teal), #0e8a62);
  color: #fff;
  box-shadow: 0 8px 18px rgba(11, 110, 79, 0.25);
}

.btn-danger {
  background: linear-gradient(135deg, #c23b22, #e05a3c);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-block {
  width: 100%;
}

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

/* Schedule */
.timeline {
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--mint), rgba(11, 110, 79, 0.15));
}

.tl-item {
  position: relative;
  padding: 0 0 14px 14px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.15);
}

.tl-item strong {
  display: block;
  font-size: 0.95rem;
}

.tl-item .time {
  color: var(--teal-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.tl-item small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

/* Rules accordion */
.acc-item {
  border-bottom: 1px solid var(--line);
}

.acc-item:last-child {
  border-bottom: 0;
}

.acc-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.acc-btn span {
  color: var(--muted);
  font-weight: 400;
}

.acc-body {
  display: none;
  padding: 0 14px 14px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.65;
}

.acc-item.open .acc-body {
  display: block;
  animation: fade 0.25s ease;
}

.acc-body p {
  margin: 0 0 10px;
}

/* Settle summary */
.summary-box {
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(160deg, #fffaf0, #ffffff);
  border: 1px solid #f0e0b8;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}

.summary-row:last-child {
  border-bottom: 0;
  font-weight: 800;
  font-size: 1.05rem;
  padding-top: 12px;
}

.bank-card {
  border-radius: 22px;
  padding: 20px;
  background:
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(135deg, #1b4332, #2d6a4f 55%, #40916c);
  color: #f4fff8;
  box-shadow: var(--shadow);
}

.bank-card .label {
  opacity: 0.85;
  font-size: 0.85rem;
}

.bank-card .balance {
  font-family: var(--display);
  font-size: 2.4rem;
  margin: 6px 0 0;
}

.hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7f6ee;
  color: var(--teal-deep);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Tabbar */
.tabbar-host,
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
}

.tabbar {
  width: min(480px, 100%);
  margin: 0 auto;
  height: calc(var(--tab-h) + var(--safe-b));
  padding: 8px 8px calc(8px + var(--safe-b));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #ffffff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 12px rgba(20, 38, 31, 0.06);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.68rem;
  color: var(--muted);
  border-radius: 12px;
}

.tab-icon {
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-icon .svg-icon {
  width: 1.15em;
  height: 1.15em;
}

.q-icon .svg-icon {
  width: 1.1em;
  height: 1.1em;
}

.btn-icon .svg-icon {
  width: 1.05em;
  height: 1.05em;
}

.badge .svg-icon {
  width: 0.95em;
  height: 0.95em;
}

.tab.active {
  color: var(--teal-deep);
  font-weight: 700;
  background: #e7f6ee;
}

/* Pager */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 0 2px;
}

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

.pager .btn {
  flex: 0 0 auto;
  min-width: 88px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

.pager .btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pager-info {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted, #6b7c74);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%) scale(0.96);
  background: rgba(20, 38, 31, 0.92);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
  max-width: min(86vw, 320px);
  text-align: center;
  box-shadow: 0 10px 28px rgba(10, 24, 18, 0.22);
}

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

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 24, 18, 0.45);
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
}

.modal-mask.show {
  display: flex;
}

.sheet,
.modal-dialog {
  width: min(400px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 18px 16px;
  box-shadow: var(--shadow);
  animation: rise 0.2s ease;
  max-height: min(85vh, 560px);
  overflow: auto;
}

.sheet h3,
.modal-dialog h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-dialog .dialog-sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.gender-picks {
  display: flex;
  gap: 10px;
}

.gender-picks label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.95rem;
}

.gender-picks input {
  accent-color: var(--teal);
}

.gender-picks label:has(input:checked),
.gender-picks label.is-on {
  border-color: var(--teal);
  background: rgba(11, 110, 79, 0.08);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.1);
}

/* 家庭成员页 */
.family-hero {
  margin-top: 4px;
}

.family-hero-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.family-name-bar {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.family-name-bar input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  font-size: 1.05rem;
  font-weight: 600;
}

.family-name-bar input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 110, 79, 0.12);
}

.family-name-bar .btn {
  flex: 0 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.family-hero-hint {
  margin: 10px 0 0;
}

.member-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(20, 38, 31, 0.04);
  padding: 14px;
  margin-bottom: 10px;
}

.member-card:last-child {
  margin-bottom: 0;
}

.member-card.is-disabled {
  opacity: 0.72;
}

.member-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.member-card-top .main {
  flex: 1;
  min-width: 0;
}

.member-card-top .main strong {
  display: block;
  font-size: 1.05rem;
}

.member-card-top .main small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3px;
  line-height: 1.4;
}

.member-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #eef5f1;
  color: var(--ink-soft);
}

.meta-chip.off {
  background: #ffe5df;
  color: var(--coral);
}

.meta-chip.on {
  background: #dff3e8;
  color: var(--teal-deep);
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.member-actions .act {
  border: 1px solid var(--line);
  background: #f7faf8;
  color: var(--teal-deep);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.member-actions .act:active {
  transform: scale(0.97);
}

.member-actions .act.danger {
  color: var(--coral);
  background: #fff6f4;
  border-color: rgba(194, 59, 34, 0.22);
}

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

.form-grid-2 > * {
  min-width: 0;
}

@media (max-width: 360px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.family-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(20, 38, 31, 0.04);
  padding: 14px;
  margin-bottom: 10px;
  color: inherit;
  text-decoration: none;
}

.family-card:last-child {
  margin-bottom: 0;
}

.family-card:active {
  transform: scale(0.99);
}

.family-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.family-card-top .main {
  flex: 1;
  min-width: 0;
}

.family-card-top .main strong {
  display: block;
  font-size: 1.05rem;
}

.family-card-top .main small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3px;
}

.family-card-arrow {
  color: var(--muted);
  margin-top: 2px;
}

.danger-zone {
  padding: 14px;
  border: 1px dashed rgba(194, 59, 34, 0.35);
  border-radius: var(--radius);
  background: #fff8f6;
}

.logs-hero {
  margin-top: 4px;
}

.logs-hero .chips {
  padding-bottom: 12px;
}

.logs-filters {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(20, 38, 31, 0.04);
  padding: 14px;
}

.logs-filters .field {
  margin: 0;
}

.logs-filters .field label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.logs-filters .field input,
.logs-filters .field select {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.logs-filter-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.log-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(20, 38, 31, 0.04);
  padding: 14px;
  margin-bottom: 10px;
}

.log-card:last-child {
  margin-bottom: 0;
}

.log-card.is-fail {
  border-color: rgba(194, 59, 34, 0.22);
  background: #fffaf8;
}

.log-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.log-card-top .main {
  flex: 1;
  min-width: 0;
}

.log-card-top .main strong {
  display: block;
  font-size: 1.05rem;
}

.log-card-top .main small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3px;
  line-height: 1.4;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.danger-text {
  color: var(--coral);
}

.ok-text {
  color: var(--teal);
}
