.notes-strip {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 0 8px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.notes-strip.is-member {
  border-bottom: 1px solid var(--border-soft);
  padding: 0 0 8px;
}

.notes-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
}

.notes-toggle:hover .notes-kicker {
  color: var(--text-muted);
}

.notes-kicker {
  margin: 0;
  padding: 0;
  font-size: 10px;
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-faint);
  line-height: 1.2;
}

.notes-chevron {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1.5px solid var(--text-faint);
  border-bottom: 1.5px solid var(--text-faint);
  opacity: 0.7;
  transform: rotate(45deg);
  transition:
    transform var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
  flex: 0 0 auto;
}

.notes-toggle:hover .notes-chevron {
  opacity: 1;
}

.notes-strip.is-collapsed .notes-chevron {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.notes-panel {
  display: grid;
  grid-template-rows: 1fr;
  min-width: 0;
  opacity: 1;
  transition:
    grid-template-rows var(--dur-med) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out);
}

.notes-panel-inner {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notes-strip.is-collapsed .notes-panel {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.notes-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notes-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.notes-compose input[type="text"] {
  width: 100%;
  min-width: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  padding: 6px 9px;
  outline: none;
  transition:
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.notes-compose input[type="text"]:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent);
}

.notes-compose input[type="text"]::placeholder {
  color: var(--text-faint);
}

.notes-compose button[type="submit"] {
  position: relative;
  min-width: 48px;
  min-height: 28px;
  font-size: 11px;
}

.notes-compose button .spinner {
  position: absolute;
}

.notes-strip .error-inline {
  margin: 0;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.notes-empty {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-faint);
}

.notes-empty.hidden {
  display: none;
}

.note-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow-card);
  transition:
    border-color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.note-row:hover {
  border-color: var(--border);
}

.note-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.note-label {
  margin: 0;
  font-size: 10px;
  font-weight: var(--fw-semi);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-faint);
  line-height: 1.2;
}

.note-body {
  margin: 0;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.4;
  font-weight: var(--fw-regular);
  color: var(--text-muted);
}

.notes-strip.is-member .note-body {
  font-weight: var(--fw-medium);
  color: var(--text);
}

.note-actions {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

.note-action {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 10px;
  font-weight: var(--fw-semi);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  cursor: pointer;
}

.note-action:hover,
.note-action:focus-visible {
  color: var(--text-muted);
}

.notes-strip.is-member .notes-compose {
  display: none;
}

.notes-strip.is-member:not(:has(.note-row)) {
  display: none;
}
