:root {
  --paper: #f5f3ed;
  --white: #fffefb;
  --ink: #303b34;
  --muted: #7a8279;
  --green: #43664e;
  --pale: #e8eee6;
  --line: #e7e6de;
  --gold: #aa8959;
  --red: #a3614b;
  --radius: 19px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font:
    15px/1.65 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft Yahei",
    sans-serif;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
a {
  color: var(--green);
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3,
.serif {
  font-family: "Songti SC", "Noto Serif CJK SC", STSong, serif;
}
h1 {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 1px;
}
h2 {
  font-size: 22px;
  font-weight: 600;
}
h3 {
  font-size: 18px;
}
.muted {
  color: var(--muted);
}
.tiny {
  font-size: 12px;
}
.small {
  font-size: 13px;
}
.icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
  flex: none;
}
.logo {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  letter-spacing: 2px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
}
.layout {
  max-width: 1370px;
  margin: auto;
  display: grid;
  grid-template-columns: 222px 1fr;
  min-height: 100vh;
}
.sidebar {
  padding: 40px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 30px;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.nav-item {
  padding: 12px 16px;
  border-radius: 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}
.nav-item.active {
  background: var(--pale);
  color: var(--green);
  font-weight: 600;
}
.sidebar .foot {
  margin-top: auto;
  padding: 15px 8px;
}
.workspace {
  padding: 30px 48px 70px;
  min-width: 0;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 28px;
}
.family {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}
.avatar {
  height: 30px;
  width: 30px;
  border-radius: 50%;
  background: #e2e7da;
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 12px;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 5px 0 24px;
  gap: 16px;
}
.header p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.between {
  justify-content: space-between;
}
.wrap {
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 17px;
  border-radius: 11px;
  background: var(--pale);
  color: var(--green);
  white-space: nowrap;
}
.btn.primary {
  background: var(--green);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
}
.btn.danger {
  color: var(--red);
  background: #f6eae3;
}
.btn.small {
  padding: 7px 11px;
  font-size: 12px;
}
.circle {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
}
.grid2 {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
}
.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stack {
  display: grid;
  gap: 15px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 23px;
}
.card.click {
  cursor: pointer;
  transition: border-color 0.15s;
}
.card.click:hover {
  border-color: #b8c8b9;
}
.card h3 + .muted {
  margin-top: 4px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 27px 0 13px;
}
.section-head h2 {
  font-size: 21px;
}
.askbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 17px 19px;
  background: #eeeee5;
  border: 1px solid #e3e5d9;
  border-radius: 14px;
  margin: 23px 0;
  color: #7c8676;
}
.money-card {
  background: var(--green);
  color: #fff;
  border: 0;
  padding: 27px;
}
.money-card .muted {
  color: #d0ddcd;
}
.big {
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.balance {
  display: flex;
  align-items: end;
  gap: 8px;
}
.mini-stat {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.mini-stat strong {
  font-size: 25px;
  font-weight: 500;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  background: var(--pale);
  color: var(--green);
  white-space: nowrap;
}
.badge.amber {
  background: #f5ecdc;
  color: #9b7541;
}
.badge.gray {
  background: #efefea;
  color: #7a8279;
}
.list-row {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}
.list-icon {
  width: 41px;
  height: 41px;
  border-radius: 12px;
  background: var(--pale);
  color: var(--green);
  display: grid;
  place-items: center;
  flex: none;
}
.list-icon.gold {
  background: #f5ecdc;
  color: #a88556;
}
.list-body {
  flex: 1;
  min-width: 0;
}
.list-title {
  font-weight: 500;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.amount {
  font-variant-numeric: tabular-nums;
  font-size: 17px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.task-card {
  border-left: 3px solid #b39464;
}
.task-card p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 7px;
}
.search {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 14px;
  width: 100%;
  outline: 0;
}
.search:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: #98b39b;
  outline: none;
}
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  background: transparent;
}
.chip.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.empty {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
}
.empty .icon {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: #9eae9b;
}
.empty h3 {
  color: var(--ink);
  margin-bottom: 7px;
}
.loading {
  padding: 50px;
  text-align: center;
  color: var(--muted);
}
.bar {
  height: 6px;
  background: #edf0e9;
  border-radius: 99px;
  margin-top: 6px;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  background: #8ca083;
  border-radius: 99px;
}
.category-bar {
  margin: 15px 0;
}
.note {
  position: relative;
  min-height: 160px;
}
.note p {
  margin: 12px 0;
  color: #667260;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.date {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
}
.remember-card {
  background: #eeeade;
  border-color: #e3ddcc;
}
.task-state {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gold);
}
.bottom-nav {
  display: none;
}
.compose-fab {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: #24332966;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(3px);
}
.sheet {
  width: 540px;
  max-height: 90vh;
  overflow: auto;
  background: var(--white);
  border-radius: 24px;
  padding: 25px;
  box-shadow: 0 25px 100px #142a2320;
}
.sheet.wide {
  width: 720px;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.sheet-head h2 {
  font-size: 23px;
}
.sheet label {
  display: block;
  margin: 15px 0 5px;
  font-size: 13px;
  color: var(--muted);
}
.sheet input:not([type="checkbox"]),
.sheet textarea,
.sheet select {
  width: 100%;
  background: #fafaf5;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  color: var(--ink);
}
.sheet textarea {
  resize: vertical;
  min-height: 110px;
}
.sheet .check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
}
.sheet .check input {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
}
.sheet-footer {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 23px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 15px;
}
.divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.info {
  background: #f0f2e9;
  color: #64715e;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.8;
}
.error-box {
  background: #faeee7;
  color: #925940;
  padding: 12px;
  border-radius: 10px;
  margin: 12px 0;
  font-size: 13px;
}
.memory-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.85;
  margin: 15px 0;
}
.login {
  max-width: 1120px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 90px;
  margin: auto;
  padding: 40px;
}
.login-copy h1 {
  font-size: 46px;
  line-height: 1.45;
  margin: 25px 0;
}
.login-copy p {
  color: var(--muted);
  max-width: 370px;
}
.login-art {
  margin-top: 45px;
  border: 1px solid #dce2d6;
  padding: 25px;
  border-radius: 22px;
  transform: rotate(-2deg);
  background: #ecefe4;
  max-width: 370px;
}
.login-card {
  padding: 33px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
}
.login-card h2 {
  margin-bottom: 8px;
}
.login-card label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin: 16px 0 6px;
}
.login-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafaf5;
  color: var(--ink);
}
.login-card .btn {
  width: 100%;
  margin-top: 15px;
}
.login-card footer {
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
}
.link {
  font-size: 12px;
  color: var(--green);
  padding: 6px 0;
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 10px 0 110px;
  max-width: 790px;
  margin: auto;
}
.chat-user {
  align-self: flex-end;
  background: var(--pale);
  border-radius: 16px 16px 3px 16px;
  padding: 13px 18px;
  max-width: 85%;
}
.chat-answer {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.chat-input {
  position: sticky;
  bottom: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  gap: 8px;
  padding: 9px;
  box-shadow: 0 5px 25px #3241320a;
}
.chat-input input {
  border: 0;
  background: none;
  min-width: 0;
  flex: 1;
  padding: 9px;
  outline: none;
}
.source {
  display: inline-flex;
  text-align: left;
  gap: 6px;
  align-items: center;
  margin: 7px 5px 0 0;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  background: #fafaf5;
  color: var(--green);
  max-width: 100%;
}
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: #324936;
  color: #fff;
  padding: 12px 19px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 8px 30px #23382622;
  display: none;
  max-width: 90vw;
}
#toast.show {
  display: flex;
  gap: 14px;
  align-items: center;
}
#toast button {
  color: #e5c68e;
  text-decoration: underline;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.settings-row:last-child {
  border: 0;
}
.file-title {
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 8px;
}
.mobile-only {
  display: none;
}
.tagline {
  font-family: "Songti SC", STSong, serif;
  font-size: 15px;
  color: #9eaa97;
}
.error-line {
  margin: 10px 0;
  color: var(--red);
}
@media (min-width: 1350px) {
  .workspace {
    padding-left: 60px;
    padding-right: 60px;
  }
}
@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 180px 1fr;
  }
  .sidebar {
    padding: 28px 15px;
  }
  .workspace {
    padding: 24px 26px 70px;
  }
  .grid2 {
    grid-template-columns: 1fr;
  }
  .grid3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .login {
    gap: 45px;
    padding: 35px;
  }
  .login-copy h1 {
    font-size: 37px;
  }
}
@media (max-width: 650px) {
  body {
    font-size: 14px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
  }
  .workspace {
    padding: 18px 19px 112px;
  }
  .top {
    padding-bottom: 23px;
  }
  .header {
    margin: 0 0 20px;
  }
  .header h1 {
    font-size: 29px;
  }
  .header p {
    max-width: 230px;
    font-size: 12px;
  }
  .header .btn {
    padding: 8px 12px;
    font-size: 12px;
  }
  .grid2 {
    gap: 14px;
  }
  .grid3 {
    gap: 10px;
  }
  .card {
    padding: 19px;
    border-radius: 17px;
  }
  .mini-stat {
    padding: 13px;
    gap: 8px;
  }
  .mini-stat strong {
    font-size: 23px;
  }
  .mini-stat .icon {
    width: 18px;
  }
  .big {
    font-size: 35px;
  }
  .money-card {
    padding: 24px;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    background: #fffefbf5;
    border-top: 1px solid var(--line);
    padding: 9px 7px calc(10px + env(safe-area-inset-bottom));
    z-index: 20;
    backdrop-filter: blur(15px);
  }
  .bottom-nav button {
    flex: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 4px;
    color: #879180;
    font-size: 10px;
    min-width: 0;
  }
  .bottom-nav button.active {
    color: var(--green);
  }
  .bottom-nav .add {
    width: 43px;
    height: 43px;
    border-radius: 15px;
    color: #fff;
    background: var(--green);
    display: grid;
    place-items: center;
    margin: -20px auto 2px;
    box-shadow: 0 5px 10px #43664e28;
  }
  .mobile-only {
    display: initial;
  }
  .sheet-backdrop {
    align-items: flex-end;
    padding: 0;
  }
  .sheet,
  .sheet.wide {
    width: 100%;
    max-height: 92vh;
    border-radius: 24px 24px 0 0;
    padding: 23px 20px calc(25px + env(safe-area-inset-bottom));
  }
  .sheet:before {
    content: "";
    display: block;
    width: 35px;
    height: 4px;
    border-radius: 3px;
    background: #dedfd6;
    margin: -11px auto 20px;
  }
  .sheet input,
  .sheet textarea {
    font-size: 16px !important;
  }
  .login {
    display: block;
    padding: 40px 24px 60px;
  }
  .login-copy h1 {
    font-size: 32px;
    margin: 22px 0 10px;
  }
  .login-copy p {
    font-size: 13px;
  }
  .login-art {
    display: none;
  }
  .login-card {
    padding: 23px;
    margin-top: 28px;
    border-radius: 20px;
  }
  .login-copy .brand {
    font-size: 25px;
  }
  .login-card h2 {
    font-size: 23px;
  }
  .chat {
    padding-bottom: 20px;
  }
  .chat-input {
    bottom: 87px;
  }
  .chat-answer {
    padding: 18px;
  }
  .list-row {
    gap: 10px;
  }
  .list-title {
    font-size: 14px;
  }
  .btn {
    padding: 10px 13px;
  }
  .btn.small {
    font-size: 11px;
  }
  .section-head {
    margin-top: 23px;
  }
  #toast {
    bottom: 97px;
  }
  .form-grid {
    gap: 0 10px;
  }
}
/* 0.3: four destinations and one persistent, voice-first conversation entry. */
.workspace {
  padding-bottom: 130px;
}
.bottom-nav {
  position: fixed;
  bottom: 18px;
  left: calc(50% + 111px);
  transform: translateX(-50%);
  width: 520px;
  display: flex;
  align-items: center;
  gap: 0;
  background: #fffefbf5;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px 13px;
  z-index: 30;
  box-shadow: 0 9px 40px #243c2710;
  backdrop-filter: blur(15px);
}
.bottom-nav button {
  flex: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  color: #879180;
  font-size: 11px;
  min-width: 0;
}
.bottom-nav button.active {
  color: var(--green);
}
.bottom-nav .add {
  width: 51px;
  height: 51px;
  border-radius: 18px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  margin: -28px auto 1px;
  box-shadow: 0 5px 13px #43664e33;
}
.bottom-nav .add .icon {
  width: 25px;
  height: 25px;
}
.bottom-nav .butler-entry {
  color: var(--green);
}
.collection-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #eaece3;
  border: 1px solid #e0e4d8;
  padding: 5px;
  gap: 6px;
  border-radius: 16px;
}
.collection-switch button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 11px;
  padding: 14px 12px;
  font-size: 15px;
  color: #7d8778;
}
.collection-switch button.selected {
  background: var(--white);
  color: var(--green);
  box-shadow: 0 2px 6px #30473309;
}
.collection-switch button[aria-selected="true"]:last-child {
  color: #987948;
}
.collection-switch small {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #e9ede4;
}
.collection-switch button:last-child small {
  background: #f2ebdd;
}
.collection-caption {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 3px 22px;
}
.notes-memory-link {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 13px;
  color: var(--green);
  padding: 15px 17px;
  border: 1px solid #e2e5d8;
  background: #edefe4;
  border-radius: 13px;
}
.note-mood {
  background: #fcf5ee;
  border-color: #efe4d7;
}
.note-mood .badge {
  background: #efe1d3;
  color: #a17d5b;
}
.note-idea {
  background: #f6f8f0;
}
.note-todo {
  background: var(--white);
}
.done-text {
  text-decoration: line-through;
  opacity: 0.55;
}
.sheet-backdrop {
  z-index: 160;
}
.butler-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  background: #22352a66;
  backdrop-filter: blur(3px);
}
.butler-sheet {
  width: 680px;
  height: 70dvh;
  max-height: calc(var(--butler-view-height, 100dvh) - 16px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid #dfe4d9;
  border-bottom: none;
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  box-shadow: 0 -12px 70px #23322614;
  position: relative;
}
.butler-handle {
  height: 4px;
  width: 36px;
  border-radius: 8px;
  background: #d5dcd0;
  flex: none;
  align-self: center;
  margin: 10px 0 0;
}
.butler-header {
  padding: 15px 23px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e3e6dc;
  flex: none;
  background: #f8f7f0;
}
.butler-header h2 {
  font-size: 22px;
  letter-spacing: 1px;
}
.butler-header p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.butler-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
}
.butler-header .circle {
  border: 0;
  width: 32px;
  height: 32px;
  color: #87917e;
}
.butler-header .icon {
  width: 19px;
  height: 19px;
}
.butler-avatar .icon {
  width: 23px;
  height: 23px;
}
.butler-messages {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 23px 22px 25px;
  scroll-behavior: smooth;
}
.butler-greeting {
  padding: 22px 6px 20px;
}
.butler-greeting h3 {
  font-size: 27px;
  font-weight: 500;
  margin: 13px 0 12px;
}
.butler-greeting p {
  font-size: 14px;
  color: #7a8574;
  line-height: 1.95;
}
.butler-suggestions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.butler-suggestions button {
  padding: 8px 10px;
  border: 1px solid #dfe5d7;
  border-radius: 9px;
  color: #718466;
  font-size: 12px;
  background: #f9faf3;
}
.butler-suggestions .icon {
  width: 13px;
  height: 13px;
  margin-left: 6px;
}
.butler-turn {
  display: flex;
  gap: 9px;
  margin: 0 0 19px;
  align-items: flex-start;
}
.butler-turn.user {
  justify-content: flex-end;
  padding-left: 40px;
}
.butler-turn.assistant {
  padding-right: 12px;
}
.butler-turn-mark {
  height: 28px;
  width: 28px;
  flex: none;
  display: grid;
  place-items: center;
  background: #e1e9da;
  color: var(--green);
  border-radius: 10px;
  margin-top: 2px;
}
.butler-turn-mark .icon {
  width: 17px;
  height: 17px;
}
.butler-answer {
  max-width: calc(100% - 37px);
  min-width: 0;
}
.butler-bubble {
  background: #fffefb;
  border: 1px solid #e7e8de;
  border-radius: 3px 15px 15px 15px;
  padding: 12px 15px;
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.user .butler-bubble {
  background: #dfe9d8;
  border-color: #d8e3d0;
  border-radius: 15px 3px 15px 15px;
  max-width: 100%;
  color: #3c5135;
}
.butler-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
  white-space: normal;
}
.butler-inline-actions .btn {
  font-size: 12px;
  padding: 7px 10px;
}
.butler-photo {
  max-width: 200px;
  max-height: 180px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}
.butler-footer {
  background: #f7f8f1;
  border-top: 1px solid #e0e6d9;
  padding: 8px 17px max(16px, env(safe-area-inset-bottom));
  flex: none;
}
.butler-voice-status {
  min-height: 22px;
  font-size: 10px;
  color: #8c9785;
  text-align: center;
  padding: 0 0 7px;
}
.butler-input-row {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}
.input-tool {
  width: 35px;
  height: 43px;
  flex: none;
  border-radius: 9px;
  color: #71846a;
  display: grid;
  place-items: center;
  background: none;
  padding: 0;
}
.input-tool .icon {
  width: 24px;
  height: 24px;
}
.butler-hold {
  flex: 1;
  height: 44px;
  border: 1px solid #dfe5d8;
  background: #fffefb;
  border-radius: 10px;
  font-size: 15px;
  color: #526b48;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: background 0.12s;
}
.butler-hold.recording {
  background: #d6e5cb;
  color: #36542d;
  border-color: #bbd0aa;
}
.butler-hold.cancelling {
  background: #f1e0d4;
  color: #996443;
  border-color: #d9bba5;
}
#butler-input-form {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 7px;
  align-items: flex-end;
}
#butler-text {
  border: 1px solid #dfe5d8;
  border-radius: 10px;
  background: #fffefb;
  resize: none;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  max-height: 90px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.butler-send {
  width: 36px;
  height: 43px;
  flex: none;
  border-radius: 10px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
}
.butler-send .icon {
  width: 19px;
}
.butler-attachments {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px 24px 8px;
  background: #f7f8f1;
  flex: none;
  border-top: 1px solid #e3e7dc;
}
.butler-attachments[hidden] {
  display: none;
}
.attachment-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 5px;
  font-size: 11px;
  background: #eeefe6;
  color: #718264;
}
.attachment-tile .icon {
  width: 25px;
  height: 25px;
}
.butler-draft-card {
  padding: 16px;
  border-radius: 3px 15px 15px 15px;
  border: 1px solid #dce4d4;
  background: #fffefb;
  min-width: 220px;
  max-width: 100%;
}
.butler-draft-card .eyebrow {
  font-size: 10px;
  letter-spacing: 1px;
}
.draft-summary {
  margin-top: 12px;
}
.draft-summary strong {
  font-size: 15px;
  font-weight: 500;
  display: block;
  overflow-wrap: anywhere;
}
.draft-chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.draft-chips span {
  font-size: 10px;
  color: #6f8063;
  background: #edf1e7;
  padding: 3px 6px;
  border-radius: 5px;
}
.butler-draft-card label {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin: 11px 0 4px;
}
.butler-draft-card input:not([type="checkbox"]),
.butler-draft-card select,
.butler-draft-card textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbf5;
  color: var(--ink);
  font-size: 13px;
  resize: vertical;
}
.butler-draft-card .form-grid {
  gap: 0 9px;
}
.butler-draft-card .check {
  display: flex;
  align-items: center;
  gap: 7px;
}
.butler-draft-card input[type="checkbox"] {
  accent-color: var(--green);
}
.draft-edit[hidden] {
  display: none;
}
.butler-typing {
  display: flex;
  gap: 5px;
  align-items: center;
  min-height: 42px;
}
.butler-typing i {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: #99a58e;
  animation: butler-pulse 1.2s infinite;
}
.butler-typing i:nth-child(2) {
  animation-delay: 0.15s;
}
.butler-typing i:nth-child(3) {
  animation-delay: 0.3s;
}
.butler-sources {
  white-space: normal;
}
.butler-sources .source {
  font-size: 11px;
  padding: 5px 7px;
}
.butler-sources .icon {
  width: 14px;
  height: 14px;
}
@keyframes butler-pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .butler-messages {
    scroll-behavior: auto;
  }
  .butler-typing i {
    animation: none;
  }
}
@media (max-width: 1000px) and (min-width: 651px) {
  .bottom-nav {
    left: calc(50% + 90px);
    width: 440px;
  }
}
@media (max-width: 650px) {
  .bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: auto;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding: 10px 7px calc(10px + env(safe-area-inset-bottom));
    box-shadow: none;
  }
  .bottom-nav .add {
    height: 47px;
    width: 47px;
    border-radius: 16px;
    margin-top: -24px;
  }
  .bottom-nav button {
    font-size: 10px;
  }
  .butler-sheet {
    width: 100%;
    height: 70dvh;
    border-radius: 24px 24px 0 0;
  }
  .butler-header {
    padding: 11px 17px 13px;
  }
  .butler-header h2 {
    font-size: 21px;
  }
  .butler-messages {
    padding: 19px 14px 19px;
  }
  .butler-greeting {
    padding: 12px 6px;
  }
  .butler-greeting h3 {
    font-size: 25px;
  }
  .butler-greeting p {
    font-size: 13px;
  }
  .butler-suggestions {
    gap: 6px;
    margin-top: 19px;
  }
  .butler-suggestions button {
    font-size: 11px;
    padding: 7px 8px;
  }
  .butler-footer {
    padding-left: 10px;
    padding-right: 10px;
  }
  .butler-input-row {
    gap: 6px;
  }
  .butler-bubble {
    font-size: 13px;
    padding: 11px 12px;
  }
  .butler-turn.assistant {
    padding-right: 0;
  }
  .butler-draft-card {
    min-width: 0;
    padding: 14px;
  }
  .butler-draft-card input:not([type="checkbox"]),
  .butler-draft-card textarea,
  .butler-draft-card select {
    font-size: 16px;
  }
  .collection-switch {
    border-radius: 14px;
  }
  .collection-switch button {
    padding: 13px 8px;
    gap: 7px;
    font-size: 14px;
  }
  .collection-switch .icon {
    width: 19px;
  }
  .collection-caption {
    font-size: 11px;
    margin: 10px 2px 17px;
  }
  .notes-memory-link {
    font-size: 12px;
    padding: 13px;
  }
  .notes-memory-link .icon {
    width: 18px;
  }
  #toast {
    z-index: 250;
  }
}
#toast.in-butler {
  bottom: 115px;
  max-width: calc(100vw - 30px);
}
.note p{display:-webkit-box;-webkit-line-clamp:6;-webkit-box-orient:vertical;overflow:hidden}
/* 0.4: a quiet, opaque dock anchored to the screen edge. */
.bottom-nav{bottom:0;left:222px;right:0;transform:none;width:auto;display:grid;grid-template-columns:repeat(5,minmax(54px,90px));justify-content:center;gap:16px;background:#fffefb;border:0;border-top:1px solid #e6e8de;border-radius:0;padding:10px 20px calc(10px + env(safe-area-inset-bottom));backdrop-filter:none;box-shadow:0 -4px 24px #243c2706;min-height:82px}
.bottom-nav .add{margin:0 auto;width:48px;height:48px;border-radius:18px}
.workspace{padding-bottom:130px}
#toast{bottom:104px}
.help-dot{display:inline-grid;place-items:center;border:1px solid #cdd3c7;border-radius:50%;width:23px;height:23px;min-width:23px;color:#7c8775;font-size:13px;font-family:serif;vertical-align:middle;margin-left:8px}
.address-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:22px 0}
.address-choice input{position:absolute;opacity:0;width:1px;height:1px}
.address-choice span{display:block;text-align:center;padding:17px 8px;background:#f4f4ec;border:1px solid #e3e6d9;border-radius:14px;color:#65705e;cursor:pointer}
.address-choice input:checked+span{background:#e5eddd;border-color:#567444;color:#35512d;font-weight:600}
.address-choice input:focus-visible+span{outline:2px solid #567444;outline-offset:3px}
.address-custom{margin:0 0 14px}
.help-copy{font-size:14px;line-height:1.95;color:#69735f;margin:12px 0 20px}
.home-stats{gap:10px}.mini-stat{display:flex;width:100%;padding:17px 20px;text-align:left}.mini-stat strong{font:26px Georgia,serif;color:#45613c}.mini-stat .icon{color:#829576}
.money-card .balance{margin:24px 0 18px}.money-foot{display:flex;justify-content:space-between;font-size:12px;color:#74816a}.money-foot .icon{width:14px;height:14px;vertical-align:middle}.money-pending{color:#a47c37}
.home-calm{display:flex;align-items:center;gap:18px;padding:24px}.home-calm p{margin-top:8px;color:#88917e;font-size:13px}.calm-mark{background:#edf0e4;border-radius:50%;padding:15px;color:#82996f}.home-empty{padding:32px 16px;text-align:center;color:#929b88;font-size:13px}
.butler-voice-status:empty{display:none}.login-server{margin:16px 0;color:#8b9582;font-size:12px}.login-server summary{cursor:pointer}.login-server label{margin-top:12px}
@media(max-width:1000px) and (min-width:701px){.bottom-nav{left:180px}}
@media(max-width:700px){.bottom-nav{left:0;right:0;bottom:0;width:100%;border-radius:0;grid-template-columns:repeat(5,1fr);gap:0;padding:9px 9px calc(9px + env(safe-area-inset-bottom));min-height:80px;background:#fffefb;backdrop-filter:none}.bottom-nav .add{margin:0 auto;width:46px;height:46px}.workspace{padding-bottom:116px}.home-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.mini-stat{flex-direction:column;align-items:flex-start;gap:12px;padding:14px 10px}.mini-stat .row{gap:5px;font-size:11px}.mini-stat .icon{width:15px;height:15px}.mini-stat strong{font-size:24px}.home-overview{gap:12px}.money-card .balance{margin:22px 0}.home-calm{padding:21px 17px}.address-choices{gap:9px}.header .help-dot{flex-shrink:0}}
.money-card .money-foot{color:#d1ddcb}.money-card .money-pending{color:#f6d79c}.connection-details{margin-bottom:18px;font-size:12px;color:#74816a}.connection-details summary{cursor:pointer}
/* 0.4.1: a larger, readable family entrance. */
.top .family{gap:12px;font-size:18px;font-weight:600;min-height:54px;max-width:calc(100% - 100px);text-align:left;line-height:1.35}.top .avatar{width:48px;height:48px;min-width:48px;font-size:21px;font-weight:500}.onboard-custom{margin-top:13px} @media(max-width:700px){.top{gap:10px;padding-bottom:23px}.top .family{font-size:17px;gap:10px}.top .avatar{width:46px;height:46px;min-width:46px;font-size:20px}.top>.row{gap:6px}}
