:root {
  --bg: #f5f5f0;
  --card: #ffffff;
  --line: #e7e6df;
  --t1: #2c2c2a;
  --t2: #5f5e5a;
  --t3: #9c9b94;
  --green: #639922;
  --amber: #ef9f27;
  --purple: #7f77dd;
  --blue: #378add;
  --accent: #185fa5;
  --danger: #d64545;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #ecebe4;
  font-family: var(--font);
  color: var(--t1);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.phone {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Desktop: show the app as a framed phone */
@media (min-width: 480px) {
  body {
    padding: 32px 16px;
    align-items: flex-start;
  }
  .phone {
    max-width: 390px;
    min-height: 0;
    height: calc(100vh - 64px);
    max-height: 860px;
    border-radius: 36px;
    border: 0.5px solid var(--line);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  }
}

/* ---------- inline svg icons (sized in em, stroked with currentColor) ---------- */
.ti {
  width: 1em;
  height: 1em;
  flex: none;
  display: inline-block;
  vertical-align: -0.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ti.fill {
  fill: currentColor;
  stroke: none;
}

/* ---------- header ---------- */
.hdr {
  padding: 1.15rem 1.15rem 0.4rem;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  flex: 0 0 auto;
}
.hdr .title {
  grid-column: 2;
  font-size: 17px;
  font-weight: 600;
  color: var(--t1);
  text-align: center;
  white-space: nowrap;
}
.icon-btn {
  grid-column: 3;
  justify-self: end;
  border: none;
  background: none;
  color: var(--t2);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  padding: 4px;
  line-height: 1;
}

/* ---------- body / cards ---------- */
#app-section {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

#app-section.hidden {
  display: none;
}

.body {
  padding: 0.9rem;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.tab-content {
  width: 100%;
  min-width: 0;
}

.card {
  width: 100%;
  max-width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.8rem;
}

.row-baseline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.h {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
}
.link {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
}
.sub {
  font-size: 13px;
  color: var(--t2);
}
.time-chip {
  font-size: 12px;
  color: var(--t3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.time-chip .ti {
  font-size: 13px;
}

/* ---------- weekly chart ---------- */
.days {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 12px;
}
.days span {
  font-size: 11px;
  color: var(--t3);
}
.chart-empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--t3);
  text-align: center;
}
.weight-chart {
  width: 100%;
  min-height: 180px;
}
.weight-chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.weight-chart .chart-label {
  fill: var(--t3);
  font-family: var(--font);
  font-size: 10px;
}
.weight-chart .chart-empty {
  min-height: 150px;
  border: 0.5px dashed var(--line);
  border-radius: 12px;
  padding: 1rem;
}
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 0.5px solid var(--line);
}
.legend span {
  font-size: 11px;
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: 5px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

/* ---------- vitamin adherence strip ---------- */
.adherence {
  display: flex;
  gap: 4px;
}
.adherence .cell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.adherence .box {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background: #e7e6df;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  line-height: 1;
}
.adherence .box.on {
  background: var(--green);
}
.adherence .box.today {
  box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--amber);
}
.adherence .d {
  font-size: 9px;
  color: var(--t3);
}

/* ---------- mood check-in ---------- */
.mood-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.35rem;
  margin-bottom: 1rem;
}
.mood-btn {
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 4px;
  width: 100%;
}
.mood-btn .face {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 23px;
  transition: box-shadow 0.12s;
}
.mood-btn .lbl {
  font-size: 11px;
  color: var(--t2);
}
.mood-btn.selected .lbl {
  color: var(--t1);
  font-weight: 600;
}

.tag-title {
  font-size: 12px;
  color: var(--t3);
  margin-bottom: 7px;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 0.9rem;
}
.tag {
  font-size: 12px;
  color: var(--t2);
  border: 0.5px solid #cfcec5;
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s;
}

.weekly-happenings {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.8rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  background: #f6f5ff;
}
.weekly-happenings-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3c3489;
  font-size: 11px;
  font-weight: 700;
}
.event-ring {
  width: 11px;
  height: 11px;
  border: 2px solid var(--purple);
  border-radius: 50%;
}
.weekly-happening {
  display: grid;
  grid-template-columns: 9px auto minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  color: var(--t2);
  font-size: 11.5px;
  line-height: 1.35;
}
.weekly-happening strong {
  color: var(--t1);
  white-space: nowrap;
}

.notebar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 0.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 8px 8px 14px;
}
.happening-field {
  display: block;
  margin-top: 0.7rem;
}
.happening-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--t2);
  font-size: 12px;
}
.ai-label {
  padding: 2px 7px;
  border-radius: 999px;
  background: #eeedfe;
  color: #534ab7;
  font-size: 10px;
  font-weight: 600;
}
.happening-field textarea {
  min-height: 58px;
  resize: vertical;
  font-size: 12.5px;
  line-height: 1.4;
}
.happening-field small {
  display: block;
  margin-top: 4px;
  color: var(--t3);
  font-size: 10.5px;
  line-height: 1.35;
}
.note-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--t1);
  outline: none;
}
.note-input::placeholder {
  color: var(--t3);
}
.mic {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.mic .ti {
  font-size: 17px;
}
.mic.listening {
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(127, 119, 221, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(127, 119, 221, 0);
  }
}

.voice {
  display: none;
  margin-top: 0.7rem;
  background: #eeedfe;
  border-radius: 12px;
  padding: 0.9rem;
}
.voice.on {
  display: block;
}
.voice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 13px;
  font-weight: 600;
  color: #3c3489;
}
.voice-head .ti {
  font-size: 16px;
  color: #534ab7;
  cursor: pointer;
}
.voice-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.voice-mic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #7f77dd;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.voice-mic .ti {
  font-size: 19px;
}
.voice-hint {
  text-align: center;
  font-size: 11px;
  color: #534ab7;
  margin-top: 0.5rem;
}
.voice-ai-hint {
  margin-top: 0.45rem;
  color: #6b65a8;
  font-size: 10.5px;
  line-height: 1.35;
  text-align: center;
}
.voice-transcript-field {
  display: block;
  margin-top: 0.75rem;
}
.voice-transcript-field span {
  display: block;
  margin-bottom: 5px;
  color: #3c3489;
  font-size: 11px;
  font-weight: 600;
}
.voice-transcript-field textarea {
  min-height: 72px;
  resize: vertical;
  background: #fff;
  border-color: #afa9ec;
  font-size: 12px;
  line-height: 1.4;
}
.entry-transcript {
  margin-top: 0.35rem;
  color: var(--t3);
  font-size: 12px;
}
.entry-transcript summary {
  cursor: pointer;
  font-weight: 600;
}
.mood-happenings,
.timeline-happenings {
  display: grid;
  gap: 3px;
  margin-top: 0.35rem;
}
.mood-happenings span,
.timeline-happenings span {
  color: #534ab7;
  font-size: 11.5px;
  line-height: 1.35;
}

/* ---------- primary button ---------- */
.save {
  width: 100%;
  margin-top: 0.9rem;
  border: none;
  background: var(--green);
  color: #fff;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.save:hover {
  opacity: 0.92;
}
.save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.save.secondary {
  background: transparent;
  color: var(--danger);
  border: 0.5px solid var(--line);
  margin-top: 0;
}

/* ---------- insights ---------- */
.insight {
  display: flex;
  align-items: center;
  gap: 11px;
}
.insight .ic {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.insight .tx {
  font-size: 13px;
  color: var(--t1);
  line-height: 1.4;
  flex: 1;
}

/* ---------- forms (shared) ---------- */
.field {
  display: block;
  margin-bottom: 0.7rem;
}
.field-label {
  display: block;
  font-size: 12px;
  color: var(--t2);
  margin-bottom: 5px;
}
input,
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--t1);
  background: var(--bg);
  border: 0.5px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(99, 153, 34, 0.12);
}

/* ---------- Lucas overview / quick log ---------- */
.baby-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.2rem 0.9rem;
}
.baby-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #faeeda;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.baby-name,
.baby-age {
  display: block;
}
.baby-name {
  font-size: 19px;
  font-weight: 650;
  line-height: 1.2;
}
.baby-age {
  margin-top: 2px;
  color: var(--t2);
  font-size: 12px;
}
.baby-reminder {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
  padding: 0.75rem 0.8rem;
  border-radius: 14px;
  background: #faeeda;
  color: #7a5206;
  font-size: 12.5px;
}
.baby-reminder-icon {
  font-size: 17px;
}
.baby-reminder > span:nth-child(2) {
  flex: 1;
}
.baby-reminder button {
  border: none;
  border-radius: 999px;
  padding: 7px 11px;
  background: #b4770f;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.home-reminders:has(.home-reminder:not(.hidden)) {
  margin-bottom: 0.9rem;
}
.home-reminder {
  margin-bottom: 0.55rem;
  padding: 0.85rem 0.9rem;
  font-size: 13px;
}
.home-reminder:last-child {
  margin-bottom: 0;
}
.home-reminder.mood-reminder {
  background: #eeedfe;
  color: #3c3489;
}
.home-reminder.mood-reminder button {
  background: #6f66c5;
}
.baby-section-label {
  margin: 0.25rem 0 0.55rem 0.15rem;
  color: var(--t2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.baby-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.baby-summary {
  min-width: 0;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.baby-summary-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--t2);
  font-size: 11.5px;
  font-weight: 600;
}
.baby-summary-icon,
.baby-quick-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.baby-summary-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 14px;
}
.baby-summary strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 18px;
  line-height: 1.15;
}
.baby-summary > span {
  display: block;
  min-height: 1.2em;
  margin-top: 3px;
  overflow: hidden;
  color: var(--t3);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#baby-vitamin-state {
  color: #b4770f;
}
#baby-vitamin-state.done {
  color: #3b6d11;
}
.feed {
  background: #eaf3de;
}
.tummy {
  background: #fae9f0;
}
.vitamin {
  background: #faeeda;
}
.weight {
  background: #e6f1fb;
}
.baby-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  margin-bottom: 1rem;
}
.baby-quick {
  min-width: 0;
  padding: 0.7rem 0.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--t2);
  font-family: inherit;
  cursor: pointer;
}
.baby-quick.open {
  border-color: var(--green);
  background: #f3f7eb;
  color: #3b6d11;
}
.baby-quick-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 0.35rem;
  border-radius: 10px;
  font-size: 18px;
}
.baby-quick > span:last-child {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.baby-inline-form {
  display: none;
  margin: -0.3rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.baby-inline-form.on {
  display: block;
  animation: baby-form-in 0.16s ease;
}
@keyframes baby-form-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.baby-duration-presets {
  display: flex;
  gap: 0.45rem;
  margin: -0.25rem 0 0.75rem;
}
.baby-duration-presets button {
  flex: 1;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--t2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.baby-duration-presets button.selected {
  border-color: #a9c77e;
  background: #eaf3de;
  color: #3b6d11;
}
.baby-activity-item {
  align-items: center;
}
.baby-activity-icon {
  flex: 0 0 auto;
  font-size: 19px;
}

/* ---------- status boxes (baby) ---------- */
.status-box {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.status-box + .status-box {
  margin-top: 0.6rem;
}
.status-ok {
  background: #eaf3de;
  color: #3b6d11;
}
.status-alert {
  background: #fbe6e6;
  color: var(--danger);
}

/* ---------- entry lists ---------- */
.entry-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.entry-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  border: 0.5px solid var(--line);
  border-radius: 12px;
  padding: 0.6rem 0.7rem;
  background: var(--bg);
}
.entry-item.empty {
  justify-content: center;
  color: var(--t3);
  font-size: 13px;
  background: transparent;
}
.entry-content {
  flex: 1;
  min-width: 0;
}
.entry-content .when {
  font-size: 13px;
  font-weight: 600;
  color: var(--t1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.entry-content p {
  margin: 0.2rem 0 0;
  font-size: 12.5px;
  color: var(--t2);
  line-height: 1.4;
}
.entry-content .points {
  margin: 0.3rem 0 0;
  padding-left: 1rem;
  font-size: 12px;
  color: var(--t3);
}
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0.4rem;
}
.entry-tags span {
  font-size: 11px;
  color: #3c3489;
  background: #eeedfe;
  border-radius: 999px;
  padding: 2px 8px;
}
.mini-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}
.delete-btn {
  flex: 0 0 auto;
  border: none;
  background: none;
  color: var(--t3);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
.delete-btn:hover {
  color: var(--danger);
  background: #fbe6e6;
}

/* ---------- history / dashboard ---------- */
.pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: #e6eff7;
  border-radius: 999px;
  padding: 4px 10px;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}
.stat {
  border: 0.5px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: var(--bg);
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--t3);
}
.stat strong {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2px 0;
  line-height: 1.15;
}
.stat-hint {
  font-size: 11px;
  color: var(--t2);
}
.timeline {
  display: grid;
  gap: 0.65rem;
}
.timeline-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 0.28rem;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--t3);
}
.timeline-main {
  flex: 1;
  min-width: 0;
}
.timeline-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 13px;
}
.timeline-title strong {
  color: var(--t1);
}
.timeline-title span {
  color: var(--t3);
}
.timeline-main p {
  margin: 0.15rem 0 0;
  font-size: 12.5px;
  color: var(--t2);
  line-height: 1.4;
}

/* ---------- important dates ---------- */
.events-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.15rem 0 0.8rem;
  padding: 0 0.2rem;
}
.events-heading .sub {
  margin-top: 0.15rem;
}
.optional {
  color: var(--t3);
  font-weight: 400;
}
.attendee-field {
  margin-bottom: 0.8rem;
  border: 0;
}
.attendee-field legend {
  margin-bottom: 0.4rem;
}
.attendee-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}
.attendee-options label {
  cursor: pointer;
}
.attendee-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.attendee-options span {
  display: block;
  padding: 0.55rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--t2);
  font-size: 12.5px;
  text-align: center;
}
.attendee-options input:checked + span {
  border-color: #afa9ec;
  background: #eeedfe;
  color: #3c3489;
  font-weight: 600;
}
.attendee-options input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.event-item {
  align-items: center;
}
.event-date {
  width: 44px;
  flex: 0 0 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  text-align: center;
}
.event-date span {
  display: block;
  padding: 2px 3px;
  background: #eeedfe;
  color: #3c3489;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.event-date strong {
  display: block;
  padding: 3px;
  font-size: 17px;
  line-height: 1.2;
}
.attendee-pill {
  display: inline-block;
  margin-top: 0.35rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e6eff7;
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 600;
}
.entry-content .event-note {
  color: var(--t3);
}

/* ---------- auth ---------- */
.auth {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1.2rem;
  gap: 1.4rem;
}
.auth-brand {
  text-align: center;
}
.auth-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #fce9e9;
  color: #e0384b;
  font-size: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
}
.auth-brand h1 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--t1);
}
.auth-brand .sub {
  margin: 0.4rem auto 0;
  max-width: 30ch;
}
.auth-form {
  margin-bottom: 0;
}
.auth-form .h {
  display: block;
  margin-bottom: 1rem;
}

/* ---------- profile ---------- */
.profile-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- bottom nav ---------- */
.nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.7rem 0 1.1rem;
  border-top: 0.5px solid var(--line);
  background: var(--card);
  flex: 0 0 auto;
}
.nav .item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.nav .item .ti {
  font-size: 21px;
  color: var(--t3);
}
.nav .item .n {
  font-size: 10px;
  color: var(--t3);
}
.nav .item.active .ti,
.nav .item.active .n {
  color: var(--green);
}
.nav .item.track {
  margin-top: -14px;
}
.fab {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab .ti {
  font-size: 24px;
  color: #fff;
}
.nav .item.track .n {
  color: var(--t3);
}

.error-text {
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 0.5rem;
  min-height: 1em;
}

.hidden {
  display: none !important;
}
