/* Habits & settings. */

/* ---------- Habits screen ---------- */
#manage-root { display: flex; flex-direction: column; gap: 14px; }

.settings-back {
  display: flex;
  align-items: center;
  gap: 2px;
  align-self: flex-start;
  min-height: 44px;
  min-width: 44px;
  padding: 0 8px 0 0;
  margin: -8px 0 4px -8px;
  border: 0;
  background: none;
  color: var(--me-ink);
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
}
.settings-back span { font-size: 22px; line-height: 1; }

.habit-card { overflow: hidden; border-radius: var(--r-card); }
.habit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px 12px 16px;
  background: none;
  border: 0;
  border-bottom: 0.5px solid var(--separator);
  font-family: var(--font-text);
  font-size: 17px;
  color: var(--ink);
  text-align: left;
  min-height: 60px;
  cursor: pointer;
  touch-action: manipulation;
}
.habit-row:last-child { border-bottom: 0; }
.habit-icon {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-60);
  font-size: 15px;
  font-weight: 600;
}
.habit-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.habit-name { font-size: 17px; font-weight: 400; }
.habit-detail { font-size: 15px; color: var(--ink-60); }
.habit-chev { color: var(--ink-30); font-size: 22px; font-weight: 400; flex-shrink: 0; }
button.habit-row.habit-add { cursor: pointer; }
.habit-add-icon {
  background: var(--me-tint);
  color: var(--me-ink);
}
.habit-add-icon svg { width: 16px; height: 16px; }
.signout-card { border-radius: var(--r-card); overflow: hidden; }
.build-foot { text-align: center; font-size: 11px; color: var(--ink-30); padding: 16px 0 8px; font-family: var(--font-text); }
.signout-btn {
  width: 100%;
  padding: 15px 16px;
  background: none;
  border: 0;
  font-family: var(--font-text);
  font-size: 17px;
  font-weight: 400;
  color: var(--destructive);
  cursor: pointer;
  min-height: 56px;
  text-align: left;
}

.habit-archive-btn { color: var(--destructive); }

/* ---------- Add/edit habit sheet controls ---------- */
.seg {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--r-ctl);
  padding: 3px;
  margin-bottom: 20px;
}
.seg button {
  flex: 1;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 600;
  min-height: 44px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--me-tint);
  color: var(--me-ink);
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.chip {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: var(--me-tint);
  color: var(--me-ink);
}
.step-val {
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 90px;
  text-align: center;
}
.stepper--target { margin-bottom: 12px; }
.stepper--partner { margin-bottom: 20px; }
.token-card {
  width: 100%;
  max-width: 360px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: left;
}
.token-card--plain {
  padding: 0;
  margin-bottom: 20px;
  background: none;
  border: 0;
  box-shadow: none;
}
.token-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-60);
  margin: 16px 0 6px;
}
.token-card label:first-child { margin-top: 0; }
.token-card input {
  width: 100%;
  min-height: 48px;
  border-radius: var(--r-ctl);
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  padding: 0 14px;
  user-select: text;
  -webkit-user-select: text;
}
.custom-unit-input { margin-top: 8px; }
