.toast {
  z-index: 200;
}

.note-actions > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.note-actions button.danger {
  color: #9b5147;
}

.admin-only[hidden] {
  display: none;
}

.admin-users {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.admin-users article {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.admin-users article:last-child {
  border-bottom: 0;
}

.admin-users strong,
.admin-users span,
.admin-users small {
  display: block;
}

.admin-users span {
  margin-top: 3px;
}

.admin-users small {
  margin-top: 5px;
  color: var(--muted);
}

.admin-users button {
  margin-left: auto;
  border: 1px solid #d9bdb6;
  background: white;
  color: #9b5147;
  border-radius: 6px;
  padding: 9px 13px;
  cursor: pointer;
}

.admin-users button:disabled {
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
}

.plan-info {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.current-plan,
.tier-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.current-plan {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.current-plan h2,
.tier-grid h3 {
  margin: 0 0 6px;
}

.current-plan p,
.tier-grid p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tier-grid small {
  display: block;
  color: #708078;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.plan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.plan-actions button {
  border: 1px solid #9eafa3;
  background: #f8faf6;
  color: var(--green);
  border-radius: 7px;
  padding: 10px 13px;
  font: 600 11px var(--sans);
  cursor: pointer;
}

.ai-review-button,
#gentleRewrite,
.heard-actions > button,
.reply-after-heard > button,
.delete-heard-ai {
  border: 1px solid #9eafa3;
  background: #f8faf6;
  color: var(--green);
  border-radius: 7px;
  padding: 10px 13px;
  font: 600 11px var(--sans);
  cursor: pointer;
}

.ai-review-button {
  width: 100%;
  margin-top: 18px;
}

.ai-review,
.ai-needs,
.heard-form,
.ai-loading,
.ai-error {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #cbd7cc;
  border-radius: 10px;
  background: #edf3eb;
}

.ai-review.safety {
  border-color: #d9b9ad;
  background: #f4e5dd;
}

.ai-review small,
.ai-needs small {
  color: #708078;
  letter-spacing: .1em;
}

.ai-review h3,
.ai-needs h3,
.heard-form h4 {
  margin: 16px 0 7px;
  font: 500 18px var(--serif);
}

.ai-review p,
.ai-review li,
.heard-form p {
  color: var(--muted);
  line-height: 1.55;
}

.ai-review blockquote {
  margin: 8px 0;
  padding: 13px;
  border-left: 3px solid #8da191;
  background: rgba(255,255,255,.6);
  font: 500 16px/1.5 var(--serif);
}

.ai-review button,
.ai-output-controls button,
.ai-needs button {
  border: 0;
  background: transparent;
  color: var(--green);
  font: 600 10px var(--sans);
  cursor: pointer;
}

.ai-output-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.ai-needs > div {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 7px;
  margin-top: 8px;
}

.ai-needs input,
.heard-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: white;
}

.heard-form {
  text-align: left;
}

.heard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.heard-form label,
.reply-after-heard label {
  display: block;
  margin: 12px 0;
  font-size: 11px;
  font-weight: 600;
}

.heard-form textarea,
.reply-after-heard textarea {
  min-height: 75px;
  margin-top: 6px;
}

.topic {
  flex-wrap: wrap;
}

.repair-main {
  flex: 1;
}

.head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.quiet-filter {
  border: 1px solid var(--line);
  background: #faf9f5;
  color: var(--green);
  border-radius: 999px;
  padding: 9px 13px;
  font: 600 11px var(--sans);
  cursor: pointer;
}

.quiet-filter[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.owner-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 3px 8px;
  font: 700 10px var(--sans);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.owner-pill.mine {
  background: #e1e9df;
  color: var(--green);
}

.owner-pill.partner {
  background: #f2e4d9;
  color: #8b5a43;
}

.owner-row {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.owner-row small,
.message small span {
  color: var(--muted);
}

.hidden-mine-note {
  width: 100%;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.repair-detail {
  margin-top: 10px;
  padding: 12px 14px;
  border-left: 3px solid #9caf9d;
  border-radius: 7px;
  background: #edf3eb;
  color: var(--muted);
  line-height: 1.55;
}

.topic .heard-form {
  flex: 0 0 100%;
}

.reply-list {
  width: 100%;
  margin-top: 14px;
  padding: 10px 14px;
  border-left: 2px solid #a8b9ab;
  background: rgba(237,243,235,.7);
}

.reply-list p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.5;
}

.reply-list strong {
  color: var(--ink);
  margin-right: 5px;
}

.welcome-guide {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin: 24px 0 6px;
  text-align: left;
}

.welcome-guide article {
  border: 1px solid #d6dbd2;
  border-radius: 10px;
  background: #faf9f5;
  padding: 14px;
}

.welcome-guide span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e1e9df;
  color: var(--green);
  font: 600 10px var(--sans);
  margin-bottom: 10px;
}

.welcome-guide strong,
.welcome-guide small {
  display: block;
}

.welcome-guide strong {
  font: 500 16px var(--serif);
}

.welcome-guide small {
  color: var(--muted);
  line-height: 1.45;
  margin-top: 5px;
}

.page-guide {
  position: relative;
  margin: -16px 0 26px;
  padding: 19px 22px;
  border: 1px solid #cfdacf;
  border-radius: 12px;
  background: linear-gradient(135deg,#edf3eb,#f8f5ef);
}

.page-guide h3 {
  margin: 0 0 7px;
  font-size: 21px;
}

.page-guide p {
  max-width: 850px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-guide button {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--green);
  font: 600 10px var(--sans);
  cursor: pointer;
}

.checkin-question {
  margin-bottom: 30px;
}

.checkin-question > p {
  margin: 0;
  font: 500 20px var(--serif);
}

.scale label {
  margin: 0;
  display: block;
}

.scale label span {
  display: block;
}

.saved-checkins {
  margin-top: 36px;
  text-align: left;
}

.saved-checkins .section-title {
  margin: 0 0 16px;
}

#checkinList {
  display: grid;
  gap: 12px;
}

.saved-checkin {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.saved-checkin small {
  color: #87908b;
}

.saved-checkin h3 {
  margin: 5px 0 12px;
  font-size: 21px;
}

.saved-checkin p {
  margin: 10px 0;
  color: var(--muted);
  line-height: 1.55;
}

.saved-checkin strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  margin-bottom: 2px;
}

.need-item > span {
  display: block;
}

.need-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.need-actions button {
  border: 0;
  background: transparent;
  color: var(--green);
  padding: 0;
  font: 600 10px var(--sans);
  cursor: pointer;
}

.need-actions .danger {
  color: #a24f43;
}

.avatars.solo span {
  margin-left: 0;
  background: var(--green);
  outline: 2px dashed rgba(63,97,82,.22);
  outline-offset: 4px;
}

.couple-card.unlinked {
  background: rgba(255,255,255,.35);
  border-radius: 10px;
  padding-inline: 10px;
}

.couple-card.unlinked strong {
  color: var(--green);
}

.status-dot.inactive {
  background: #b9b8ad;
}

@media(max-width:600px) {
  .welcome-guide {
    grid-template-columns: 1fr;
  }

  .page-guide {
    padding-top: 42px;
  }

  .tier-grid {
    grid-template-columns: 1fr;
  }

  .ai-needs > div {
    grid-template-columns: 1fr;
  }
}
